From 9cf85285181db36aeeebdf78090380c50ff67d61 Mon Sep 17 00:00:00 2001
From: Sheogorath <sheogorath@shivering-isles.com>
Date: Fri, 5 Nov 2021 22:30:31 +0100
Subject: [PATCH] fix(kubeadm-init): Adjust the host names for the make-ssh
 magic

---
 utils/kubernetes-init.mk | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/utils/kubernetes-init.mk b/utils/kubernetes-init.mk
index c43edcf21..42eaf56cb 100644
--- a/utils/kubernetes-init.mk
+++ b/utils/kubernetes-init.mk
@@ -1,19 +1,19 @@
 .PHONY: kubeadm-init
 kubeadm-init:
-	ssh node01.$(TF_VAR_dns_domain) kubeadm init --control-plane-endpoint "api.$(TF_VAR_dns_domain):6443" --upload-certs --pod-network-cidr "192.168.0.0/16"
-	ssh node01.$(TF_VAR_dns_domain) systemctl enable kubelet.service
+	ssh cp01.$(TF_VAR_dns_domain) kubeadm init --control-plane-endpoint "api.$(TF_VAR_dns_domain):6443" --upload-certs --pod-network-cidr "192.168.0.0/16"
+	ssh cp01.$(TF_VAR_dns_domain) systemctl enable kubelet.service
 
-kubeadm-copy-config: ## Copy Kubernetes admin config from node01 to the local machine
-	scp node01.$(TF_VAR_dns_domain):/etc/kubernetes/admin.conf /root/.kube/config
+kubeadm-copy-config: ## Copy Kubernetes admin config from cp01 to the local machine
+	scp cp01.$(TF_VAR_dns_domain):/etc/kubernetes/admin.conf /root/.kube/config
 
 kubeadm-join-masters:
-	ssh node02.$(TF_VAR_dns_domain) $$(ssh node01.$(TF_VAR_dns_domain) kubeadm token create --ttl 1h --print-join-command --certificate-key "$$(ssh node01.$(TF_VAR_dns_domain) kubeadm init phase upload-certs --upload-certs | tail -1)" | tail -1)
-	ssh node02.$(TF_VAR_dns_domain) systemctl enable kubelet.service
-	ssh node03.$(TF_VAR_dns_domain) $$(ssh node01.$(TF_VAR_dns_domain) kubeadm token create --ttl 1h --print-join-command --certificate-key "$$(ssh node01.$(TF_VAR_dns_domain) kubeadm init phase upload-certs --upload-certs | tail -1)" | tail -1)
-	ssh node03.$(TF_VAR_dns_domain) systemctl enable kubelet.service
+	ssh cp02.$(TF_VAR_dns_domain) $$(ssh cp01.$(TF_VAR_dns_domain) kubeadm token create --ttl 1h --print-join-command --certificate-key "$$(ssh cp01.$(TF_VAR_dns_domain) kubeadm init phase upload-certs --upload-certs | tail -1)" | tail -1)
+	ssh cp02.$(TF_VAR_dns_domain) systemctl enable kubelet.service
+	ssh cp03.$(TF_VAR_dns_domain) $$(ssh cp01.$(TF_VAR_dns_domain) kubeadm token create --ttl 1h --print-join-command --certificate-key "$$(ssh cp01.$(TF_VAR_dns_domain) kubeadm init phase upload-certs --upload-certs | tail -1)" | tail -1)
+	ssh cp03.$(TF_VAR_dns_domain) systemctl enable kubelet.service
 
 kubectl-remove-first-master-taints:
-	kubectl taint nodes node01.$(TF_VAR_dns_domain) node-role.kubernetes.io/master-
+	kubectl taint nodes cp01.$(TF_VAR_dns_domain) node-role.kubernetes.io/master-
 
 kubectl-remove-all-master-taints:
 	kubectl taint nodes --all node-role.kubernetes.io/master- || true
-- 
GitLab