diff --git a/clr-k8s-examples/create_stack.sh b/clr-k8s-examples/create_stack.sh index dc566bc..5dc27cd 100755 --- a/clr-k8s-examples/create_stack.sh +++ b/clr-k8s-examples/create_stack.sh @@ -29,6 +29,12 @@ function finish() { trap finish EXIT function cluster_init() { + if ! [ -z ${TOKEN} ]; then + sed -i "/InitConfiguration/a bootstrapTokens:\\n- token: ${TOKEN}" ./kubeadm.yaml + fi + if ! [ -z ${MASTER_IP} ]; then + sed -i "/InitConfiguration/a localAPIEndpoint:\\n advertiseAddress: ${MASTER_IP}" ./kubeadm.yaml + fi #This only works with kubernetes 1.12+. The kubeadm.yaml is setup #to enable the RuntimeClass featuregate if [[ -d /var/lib/etcd ]]; then