From c60ec642bcfb49ffb057099b400c99a636f8cf01 Mon Sep 17 00:00:00 2001 From: Dalton Hubble Date: Sun, 26 Aug 2018 21:34:52 -0700 Subject: [PATCH] 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 --- azure/container-linux/kubernetes/workers/cl/worker.yaml.tmpl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure/container-linux/kubernetes/workers/cl/worker.yaml.tmpl b/azure/container-linux/kubernetes/workers/cl/worker.yaml.tmpl index aa9f9c90..adb66ec2 100644 --- a/azure/container-linux/kubernetes/workers/cl/worker.yaml.tmpl +++ b/azure/container-linux/kubernetes/workers/cl/worker.yaml.tmpl @@ -113,7 +113,7 @@ storage: docker://k8s.gcr.io/hyperkube:v1.11.2 \ --net=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: users: - name: core