This commit is contained in:
D4rk4 2020-07-31 16:44:43 +02:00
parent f16161568e
commit bcca957c21
2 changed files with 8 additions and 3 deletions

View file

@ -20,7 +20,7 @@
# when: and ansible_hostname == k8s_first_master_node
- name: Install Calico CNI
command: kubectl apply -f "https://docs.projectcalico.org/v3.13/manifests/calico.yaml"
command: KUBECONFIG=/root/.kube/config kubectl apply -f "https://docs.projectcalico.org/v3.13/manifests/calico.yaml"
when: ansible_hostname == k8s_first_master_node

View file

@ -7,15 +7,20 @@ k8sDemoWA () {
echo 'Disabling swap space...'
sync && swapoff -a && sed -i '/ swap / s/^/#/' /etc/fstab
}
ansible () {
k8sDeploy () {
echo 'Installing K8s...'
cd ${groot}/contrib/ansible && \
ansible-playbook bootstrap-node.yml && \
ansible-playbook init-cluster.yml
}
InstallIngress () {
}
if [ ! -f ${bootflag} ]; then
touch ${bootflag}
k8sDemoWA;
ansible;
k8sDeploy;
sync;
reboot;
fi