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
 | 
					#  when: and ansible_hostname == k8s_first_master_node
 | 
				
			||||||
 | 
					
 | 
				
			||||||
- name: Install Calico CNI 
 | 
					- 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
 | 
					  when:  ansible_hostname == k8s_first_master_node
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -7,15 +7,20 @@ k8sDemoWA () {
 | 
				
			||||||
    echo 'Disabling swap space...'
 | 
					    echo 'Disabling swap space...'
 | 
				
			||||||
    sync && swapoff -a && sed -i '/ swap / s/^/#/' /etc/fstab
 | 
					    sync && swapoff -a && sed -i '/ swap / s/^/#/' /etc/fstab
 | 
				
			||||||
} 
 | 
					} 
 | 
				
			||||||
ansible () {
 | 
					k8sDeploy () {
 | 
				
			||||||
    echo 'Installing K8s...'
 | 
					    echo 'Installing K8s...'
 | 
				
			||||||
    cd ${groot}/contrib/ansible && \
 | 
					    cd ${groot}/contrib/ansible && \
 | 
				
			||||||
    ansible-playbook bootstrap-node.yml && \
 | 
					    ansible-playbook bootstrap-node.yml && \
 | 
				
			||||||
    ansible-playbook init-cluster.yml
 | 
					    ansible-playbook init-cluster.yml
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
 | 
					InstallIngress () {
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
if [ ! -f ${bootflag} ]; then
 | 
					if [ ! -f ${bootflag} ]; then
 | 
				
			||||||
    touch ${bootflag} 
 | 
					    touch ${bootflag} 
 | 
				
			||||||
    k8sDemoWA;
 | 
					    k8sDemoWA;
 | 
				
			||||||
    ansible;
 | 
					    k8sDeploy;
 | 
				
			||||||
 | 
					    sync;
 | 
				
			||||||
 | 
					    reboot;
 | 
				
			||||||
fi
 | 
					fi
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue