fix
This commit is contained in:
parent
f16161568e
commit
bcca957c21
2 changed files with 8 additions and 3 deletions
|
@ -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
|
||||
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue