You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. What kops version are you running? The command kops version, will display
this information.
Client version: 1.30.1 (git-v1.30.1)
2. What Kubernetes version are you running? kubectl version will print the
version if a cluster is running or provide the Kubernetes version specified as
a kops flag.
kubernetesVersion: 1.29.6
3. What cloud provider are you using?
Hetzner
4. What commands did you run? What is the simplest way to reproduce this issue?
I am waiting for the configuration file to be correctly written to the Hetzner storage
7. Please provide your cluster manifest. Execute kops get --name my.example.com -o yaml to display your cluster manifest.
You may want to remove your cluster name and other sensitive information.
apiVersion: kops.k8s.io/v1alpha2kind: Clustermetadata:
creationTimestamp: null# Clustername muss für Hetzner in diesem Format seinname: int-k8s-stage.k8s.localspec:
api:
loadBalancer:
# macht keinen Unterschiedtype: Publicauthorization:
rbac: {}# Verwaltung vom Cert-Manager durch kOps, Issuer muss selbstständig installiert werdencertManager:
enabled: truedefaultIssuer: letsencryptchannel: stablecloudProvider: hetzner# das Schema do (Digital Ocean) verwenden, # um die AES256-Verschlüsselung beim Speichern auf dem Hetzner-Speicher zu deaktivierenconfigBase: do://int-k8s-stage-kops-state/int-k8s-stage.k8s.local# 1 etcd Member pro Control-PlaneetcdClusters:
- cpuRequest: 200metcdMembers:
- instanceGroup: control-plane-nbg1-1name: etcd-1memoryRequest: 100Miname: main
- cpuRequest: 100metcdMembers:
- instanceGroup: control-plane-nbg1-1name: etcd-1memoryRequest: 100Miname: eventsiam:
allowContainerRegistry: truelegacy: false# muss deaktiviert werden für CiliumkubeProxy:
enabled: falsekubelet:
anonymousAuth: false# funktioniert bisher nichtkubernetesApiAccess:
- 0.0.0.0/0
- ::/0kubernetesVersion: 1.29.6metricsServer:
enabled: truenetworkCIDR: 10.61.0.0/16# Cilium als CNInetworking:
cilium:
enableNodePort: truenonMasqueradeCIDR: 100.64.0.0/10# sshAccess kann limitiert werdensshAccess:
- 0.0.0.0/0 subnets:
- name: nbg1type: Publiczone: nbg1topology:
dns:
type: Private# auf private setzen macht keinen Unterschiedmasters: publicnodes: public
---
# Control-Plane 1apiVersion: kops.k8s.io/v1alpha2kind: InstanceGroupmetadata:
creationTimestamp: nulllabels:
kops.k8s.io/cluster: int-k8s-stage.k8s.localname: control-plane-nbg1-1spec:
image: ubuntu-22.04machineType: cx22maxSize: 1minSize: 1role: Mastersubnets:
- nbg1
---
# Worker InstanceGroup, skalieren durch Anpassen der min- und maxSizeapiVersion: kops.k8s.io/v1alpha2kind: InstanceGroupmetadata:
creationTimestamp: nulllabels:
kops.k8s.io/cluster: int-k8s-stage.k8s.localenvironment: stagingname: nodes-nbg1spec:
image: ubuntu-22.04machineType: cx32maxSize: 3minSize: 3role: Nodesubnets:
- nbg1
8. Please run the commands with most verbose logging by adding the -v 10 flag.
Paste the logs into this report, or in a gist and provide the gist link here.
I1105 16:45:06.860431 40 factory.go:82] state store s3://new
I1105 16:45:06.866333 40 s3context.go:106] Found S3_ENDPOINT="https://new.fsn1.your-objectstorage.com/", using as non-AWS S3 backend
I1105 16:45:06.866910 40 s3fs.go:385] Reading file "s3://new/int-k8s-stage.k8s.local/config"
I1105 16:45:07.996227 40 defaults.go:262] Not setting up Proxy Excludes
I1105 16:45:08.001304 40 s3fs.go:385] Reading file "s3://new/int-k8s-stage.k8s.local/config"
I1105 16:45:09.192732 40 s3fs.go:303] Writing file "s3://new/int-k8s-stage.k8s.local/config"
I1105 16:45:09.192768 40 s3context.go:259] Checking default bucket encryption for "new"
I1105 16:45:09.192776 40 s3context.go:264] Calling S3 GetBucketEncryption Bucket="new"
I1105 16:45:10.411098 40 s3context.go:271] Unable to read bucket encryption policy for "new": will encrypt using AES256
I1105 16:45:10.411123 40 s3fs.go:323] Calling S3 PutObject Bucket="new" Key="int-k8s-stage.k8s.local/config" SSE="AES256" ACL=""
Error: error creating cluster: error writing Cluster "int-k8s-stage.k8s.local": error writing configuration file s3://new/int-k8s-stage.k8s.local/config: error writing s3://new/int-k8s-stage.k8s.local/config: operation error S3: PutObject, https response error StatusCode: 400, RequestID: tx00000f7a6d034f2c71e7b-00672a4b96-57491f7-fsn1-prod1-ceph3, HostID: 57491f7-fsn1-prod1-ceph3-fsn1-prod1, api error InvalidArgument: UnknownError
9. Anything else do we need to know?
Recently I have been working on a task to move kops kubernetes cluster backups from minio to hetzner storage.
Minio uses the AES256 key for encrypting its backups. So when the Minio buckets are accessed by Kops to save the Kubernetes cluster configuration file, the SSE=‘AES256’ flag is present on the command line and the save operation succeeds.
I have changed the pipeline variables to Hetzner access parameters:
S3_ENDPOINT=https://fsn1.your-objectstorage.com
S3_ACCESS_KEY_ID=***********
S3_SECRET_ACCESS_KEY=*************
After that I started getting the Kops error when trying to write the cluster configuration file to Hetzner storage
$ kops replace --force -f kops-manifest.yaml 27Error: error creating cluster: error writing Cluster "int-k8s-stage.k8s.local": error writing configuration file s3://int-k8s-stage-kops-state/int-k8s-stage.k8s.local/config: error writing s3://int-k8s-stage-kops-state/int-k8s-stage.k8s.local/config: operation error S3: PutObject, https response error StatusCode: 400, RequestID: tx0000082b990f3bed2d284-006729e67b-529ccd2-fsn1-prod1-ceph3, HostID: 529ccd2-fsn1-prod1-ceph3-fsn1-prod1, api error InvalidArgument: UnknownError
As you can see, Kops cannot write the config file to the Hetzner storage and gets error 400 and InvalidArgument.
I tried different options to write variables for the pipeline, but it was unsuccessful. Also the introduction of the SSE=‘’ and SSE=‘-’ variable did not change the situation. The default Kops variable SSE=‘AES256’ has a higher priority than the pipeline variables.
According to the Kops documentation, Kops currently supports SSE-S3 (server-side encryption using Amazon S3 keys) and SSE-KMS (server-side encryption using AWS KMS keys). It is for this purpose that the AES256 key is used. https://kops.sigs.k8s.io/getting_started/aws/
Unfortunately, I have to say that the Kops and Hezner encryption schemes are not the same at the moment.
Questions
Is it possible to ensure that kubernetes cluster data from kops is saved to Hetzner Storage while maintaining the existing encryption schemes?
If it is possible: what Kops settings should I change to avoid a file write error when using Kops?
The solution that helped me avoid the error but did not configure encryption:
Changing the KOPS_STATE_STORE variable
From: KOPS_STATE_STORE=s3://int-k8s-stage-kops-state
To: KOPS_STATE_STORE=do://int-k8s-stage-kops-state
In this case, do:// specifies the DigitalOcean scheme when saving the configuration file.
Reference: Kops Documentation: Digital Ocean State
DigitalOcean (do://)
DigitalOcean storage is configured as a flavor of an S3 store.
The difference is not described in the documentation, but in practice, when using this method, the Kops SSE variable is set to "-", meaning encryption is disabled.
Modifying kops-manifest.yaml
yaml
configBase: do://int-k8s-stage-kops-state/int-k8s-stage.k8s.local
These two changes allow using Hetzner storage for storing the configuration file and Kops backups.
Major Drawback:
The data remains unencrypted.
The text was updated successfully, but these errors were encountered:
/kind bug
1. What
kops
version are you running? The commandkops version
, will displaythis information.
Client version: 1.30.1 (git-v1.30.1)
2. What Kubernetes version are you running?
kubectl version
will print theversion if a cluster is running or provide the Kubernetes version specified as
a
kops
flag.kubernetesVersion: 1.29.6
3. What cloud provider are you using?
Hetzner
4. What commands did you run? What is the simplest way to reproduce this issue?
kops replace --force -f kops-manifest.yaml --v=10
5. What happened after the commands executed?
I1105 16:45:10.411123 40 s3fs.go:323] Calling S3 PutObject Bucket="new" Key="int-k8s-stage.k8s.local/config" SSE="AES256" ACL=""
Error: error creating cluster: error writing Cluster "int-k8s-stage.k8s.local": error writing configuration file s3://new/int-k8s-stage.k8s.local/config: error writing s3://new/int-k8s-stage.k8s.local/config: operation error S3: PutObject, https response error StatusCode: 400, RequestID: tx00000f7a6d034f2c71e7b-00672a4b96-57491f7-fsn1-prod1-ceph3, HostID: 57491f7-fsn1-prod1-ceph3-fsn1-prod1, api error InvalidArgument: UnknownError
6. What did you expect to happen?
I am waiting for the configuration file to be correctly written to the Hetzner storage
7. Please provide your cluster manifest. Execute
kops get --name my.example.com -o yaml
to display your cluster manifest.You may want to remove your cluster name and other sensitive information.
8. Please run the commands with most verbose logging by adding the
-v 10
flag.Paste the logs into this report, or in a gist and provide the gist link here.
I1105 16:45:06.860431 40 factory.go:82] state store s3://new
I1105 16:45:06.866333 40 s3context.go:106] Found S3_ENDPOINT="https://new.fsn1.your-objectstorage.com/", using as non-AWS S3 backend
I1105 16:45:06.866910 40 s3fs.go:385] Reading file "s3://new/int-k8s-stage.k8s.local/config"
I1105 16:45:07.996227 40 defaults.go:262] Not setting up Proxy Excludes
I1105 16:45:08.001304 40 s3fs.go:385] Reading file "s3://new/int-k8s-stage.k8s.local/config"
I1105 16:45:09.192732 40 s3fs.go:303] Writing file "s3://new/int-k8s-stage.k8s.local/config"
I1105 16:45:09.192768 40 s3context.go:259] Checking default bucket encryption for "new"
I1105 16:45:09.192776 40 s3context.go:264] Calling S3 GetBucketEncryption Bucket="new"
I1105 16:45:10.411098 40 s3context.go:271] Unable to read bucket encryption policy for "new": will encrypt using AES256
I1105 16:45:10.411123 40 s3fs.go:323] Calling S3 PutObject Bucket="new" Key="int-k8s-stage.k8s.local/config" SSE="AES256" ACL=""
Error: error creating cluster: error writing Cluster "int-k8s-stage.k8s.local": error writing configuration file s3://new/int-k8s-stage.k8s.local/config: error writing s3://new/int-k8s-stage.k8s.local/config: operation error S3: PutObject, https response error StatusCode: 400, RequestID: tx00000f7a6d034f2c71e7b-00672a4b96-57491f7-fsn1-prod1-ceph3, HostID: 57491f7-fsn1-prod1-ceph3-fsn1-prod1, api error InvalidArgument: UnknownError
9. Anything else do we need to know?
Recently I have been working on a task to move kops kubernetes cluster backups from minio to hetzner storage.
Minio uses the AES256 key for encrypting its backups. So when the Minio buckets are accessed by Kops to save the Kubernetes cluster configuration file, the SSE=‘AES256’ flag is present on the command line and the save operation succeeds.
I have changed the pipeline variables to Hetzner access parameters:
S3_ENDPOINT=https://fsn1.your-objectstorage.com
S3_ACCESS_KEY_ID=***********
S3_SECRET_ACCESS_KEY=*************
After that I started getting the Kops error when trying to write the cluster configuration file to Hetzner storage
$ kops replace --force -f kops-manifest.yaml
27Error: error creating cluster: error writing Cluster "int-k8s-stage.k8s.local": error writing configuration file s3://int-k8s-stage-kops-state/int-k8s-stage.k8s.local/config: error writing s3://int-k8s-stage-kops-state/int-k8s-stage.k8s.local/config: operation error S3: PutObject, https response error StatusCode: 400, RequestID: tx0000082b990f3bed2d284-006729e67b-529ccd2-fsn1-prod1-ceph3, HostID: 529ccd2-fsn1-prod1-ceph3-fsn1-prod1, api error InvalidArgument: UnknownError
As you can see, Kops cannot write the config file to the Hetzner storage and gets error 400 and InvalidArgument.
I tried different options to write variables for the pipeline, but it was unsuccessful. Also the introduction of the SSE=‘’ and SSE=‘-’ variable did not change the situation. The default Kops variable SSE=‘AES256’ has a higher priority than the pipeline variables.
According to the Hetzner Storage documentation, Hetzner currently supports only one type of encryption: Encryption (nur SSE-C)
https://docs.hetzner.com/de/storage/object-storage/supported-actions/
According to the Kops documentation, Kops currently supports SSE-S3 (server-side encryption using Amazon S3 keys) and SSE-KMS (server-side encryption using AWS KMS keys). It is for this purpose that the AES256 key is used.
https://kops.sigs.k8s.io/getting_started/aws/
Unfortunately, I have to say that the Kops and Hezner encryption schemes are not the same at the moment.
Questions
The solution that helped me avoid the error but did not configure encryption:
Changing the KOPS_STATE_STORE variable
From: KOPS_STATE_STORE=s3://int-k8s-stage-kops-state
To: KOPS_STATE_STORE=do://int-k8s-stage-kops-state
In this case, do:// specifies the DigitalOcean scheme when saving the configuration file.
Reference: Kops Documentation: Digital Ocean State
DigitalOcean (do://)
DigitalOcean storage is configured as a flavor of an S3 store.
The difference is not described in the documentation, but in practice, when using this method, the Kops SSE variable is set to "-", meaning encryption is disabled.
Modifying kops-manifest.yaml
yaml
configBase: do://int-k8s-stage-kops-state/int-k8s-stage.k8s.local
These two changes allow using Hetzner storage for storing the configuration file and Kops backups.
Major Drawback:
The data remains unencrypted.
The text was updated successfully, but these errors were encountered: