Skip to content
This repository has been archived by the owner on Jan 20, 2022. It is now read-only.

How to configure S3 state store region #301

Open
loshz opened this issue Feb 26, 2020 · 1 comment
Open

How to configure S3 state store region #301

loshz opened this issue Feb 26, 2020 · 1 comment

Comments

@loshz
Copy link

loshz commented Feb 26, 2020

I have a successfully running cluster created by kops. However, I recently discovered that the S3 state store bucket was created in the wrong region, so I moved it to a new region using the following steps:

  • Took backup of old bucket
  • Deleted bucket
  • Recreated bucket with the same name in a different region

This all works fine, and I'm able to use kops as expected.

However, the problem is with etcd-manager. It's still looking for the S3 bucket in the old region and I can't see where to update this in config. There is no reference to an S3 region in /etc/kubernetes/manifests/etcd-manager.....

BucketRegionError: incorrect region, the bucket is not in 'ap-northeast-1' region at endpoint ''

I tried manually restarting one of the etcd-manager pods to see if it automatically detected the S3 bucket region, but unfortunately that didn't help.

How do I go about updating this?

@loshz
Copy link
Author

loshz commented Mar 3, 2020

After looking into the manifest file for this service, I cannot find a reference to an AWs region:

spec:
  containers:
  - command:
    - /bin/sh
    - -c
    - mkfifo /tmp/pipe; (tee -a /var/log/etcd.log < /tmp/pipe & ) ; exec /etcd-manager
      --backup-store=s3://<s3 bucket>/backups/etcd/main
      --client-urls=https://__name__:4001 --cluster-name=etcd --containerized=true
      --dns-suffix=.internal.ap-northeast-1.my-cluster.com --etcd-insecure=false
      --grpc-port=3996 --insecure=false --peer-urls=https://__name__:2380 --quarantine-client-urls=https://__name__:3994
      --v=6 --volume-name-tag=k8s.io/etcd/main --volume-provider=aws --volume-tag=k8s.io/etcd/main
      --volume-tag=k8s.io/role/master=1 --volume-tag=kubernetes.io/cluster/ap-northeast-1.my-cluster.com=owned
      > /tmp/pipe 2>&1

I've also searched every file in the kops S3 state store and cannot find a reference to the ap-northeast-1 region.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant