diff --git a/kubernetes/ha/lib/trigger.rb b/kubernetes/ha/lib/trigger.rb index fb531a4..136bc0d 100644 --- a/kubernetes/ha/lib/trigger.rb +++ b/kubernetes/ha/lib/trigger.rb @@ -53,5 +53,8 @@ system("vagrant ssh --no-tty -c 'cat /opt/certificates/admin.pem' " + k8s['cluster']['ha'] + " > ${HOME}/.kube/admin.pem") system("vagrant ssh --no-tty -c 'cat /opt/certificates/admin-key.pem' " + k8s['cluster']['ha'] + " > ${HOME}/.kube/admin-key.pem") system("kubectl config set-cluster kubernetes-the-hard-way --certificate-authority=${HOME}/.kube/ca.pem --embed-certs=true --server=https://#{k8s['ip_part']}.#{k8s['resources']['ha']['ip_prefix']}:6443 && kubectl config set-credentials admin --client-certificate=${HOME}/.kube/admin.pem --client-key=${HOME}/.kube/admin-key.pem && kubectl config set-context kubernetes-the-hard-way --cluster=kubernetes-the-hard-way --user=admin && kubectl config use-context kubernetes-the-hard-way") + + # Deploying the DNS Cluster Add-on + system("kubectl apply -f https://storage.googleapis.com/kubernetes-the-hard-way/coredns-1.8.yaml") end end diff --git a/kubernetes/ha/script/bootstrap.sh b/kubernetes/ha/script/bootstrap.sh index 973aacb..91acaf9 100644 --- a/kubernetes/ha/script/bootstrap.sh +++ b/kubernetes/ha/script/bootstrap.sh @@ -54,3 +54,7 @@ mkdir -p /home/vagrant/certificates && chown vagrant:vagrant -R $_ ufw enable <<> /etc/ssh/ssh_config +echo "ClientAliveCountMax 5" >> /etc/ssh/ssh_config \ No newline at end of file diff --git a/kubernetes/ha/script/bootstrap_ha.sh b/kubernetes/ha/script/bootstrap_ha.sh index e115c82..07036ee 100644 --- a/kubernetes/ha/script/bootstrap_ha.sh +++ b/kubernetes/ha/script/bootstrap_ha.sh @@ -58,4 +58,8 @@ ufw enable <<> /etc/ssh/ssh_config +echo "ClientAliveCountMax 5" >> /etc/ssh/ssh_config \ No newline at end of file