Fix Azure delete-node script to lowercase hostnames
* Fix issue where worker nodes didn't delete themselves on scale-down or deallocation (e.g. low priority instances). Lowercase the hostname and delete the Kubernetes node * Kubelet registers the lowercase hostname as the node name, but Azure workers get hostname CLUSTER-worker-GENERATED where the generated identifier may contain uppercase characters
This commit is contained in:
parent
38b4ff4700
commit
c60ec642bc
|
@ -113,7 +113,7 @@ storage:
|
||||||
docker://k8s.gcr.io/hyperkube:v1.11.2 \
|
docker://k8s.gcr.io/hyperkube:v1.11.2 \
|
||||||
--net=host \
|
--net=host \
|
||||||
--dns=host \
|
--dns=host \
|
||||||
--exec=/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname)
|
--exec=/kubectl -- --kubeconfig=/etc/kubernetes/kubeconfig delete node $(hostname | tr '[:upper:]' '[:lower:]')
|
||||||
passwd:
|
passwd:
|
||||||
users:
|
users:
|
||||||
- name: core
|
- name: core
|
||||||
|
|
Loading…
Reference in New Issue