0

I have a running etcd cluster with five members (Own etcd cluster for Kubernetes). How can I include this in the kubeadm init command? My idea is that I generate the configuration, edit it manually and then run it. In theory, these are two commands, but I don't know exactly what they are.

1

1 Answer 1

2

You need to create a Kind ClusterConfiguration in which you need to add the etcd config.

apiVersion: kubeadm.k8s.io/v1beta2
kind: ClusterConfiguration
kubernetesVersion: stable
controlPlaneEndpoint: "LOAD_BALANCER_DNS:LOAD_BALANCER_PORT"
etcd:
    external:
        endpoints:
        - https://ETCD_0_IP:2379
        - https://ETCD_1_IP:2379
        - https://ETCD_2_IP:2379
        caFile: /etc/kubernetes/pki/etcd/ca.crt
        certFile: /etc/kubernetes/pki/apiserver-etcd-client.crt
        keyFile: /etc/kubernetes/pki/apiserver-etcd-client.key

Remember to replace following variables with values for your cluster:

  • LOAD_BALANCER_DNS
  • LOAD_BALANCER_PORT
  • ETCD_0_IP
  • ETCD_1_IP
  • ETCD_2_IP

Once done you can init those using kubeadm init --config kubeadm-config.yaml --upload-certs

You can also have a look at Kubernetes The Hard Way.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .