Making ip addresses of controllers a variable
parent
b974042d95
commit
5208cab72e
|
@ -322,11 +322,16 @@ cat > kubernetes-csr.json <<EOF
|
|||
}
|
||||
EOF
|
||||
|
||||
for i in 0 1 2; do
|
||||
declare CONTROLLER_${i}=$(gcloud compute instances describe controller-$i \
|
||||
--format 'value(networkInterfaces[0].networkIP)');
|
||||
done
|
||||
|
||||
cfssl gencert \
|
||||
-ca=ca.pem \
|
||||
-ca-key=ca-key.pem \
|
||||
-config=ca-config.json \
|
||||
-hostname=10.32.0.1,10.240.0.10,10.240.0.11,10.240.0.12,${KUBERNETES_PUBLIC_ADDRESS},127.0.0.1,kubernetes.default \
|
||||
-hostname=10.32.0.1,${CONTROLLER_0},${CONTROLLER_1},${CONTROLLER_2},${KUBERNETES_PUBLIC_ADDRESS},127.0.0.1,kubernetes.default \
|
||||
-profile=kubernetes \
|
||||
kubernetes-csr.json | cfssljson -bare kubernetes
|
||||
|
||||
|
|
Loading…
Reference in New Issue