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:
Dalton Hubble 2018-08-26 21:34:52 -07:00
parent 38b4ff4700
commit c60ec642bc
1 changed files with 1 additions and 1 deletions

View File

@ -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