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.
Asked
Active
Viewed 1,370 times
0

uav
- 534
- 5
- 20
-
2https://kubernetes.io/docs/setup/production-environment/tools/kubeadm/high-availability/ – c4f4t0r Feb 08 '20 at 20:03
1 Answers
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.

Crou
- 739
- 3
- 10