Skip to content

fengye87/ansible-playbook-kubernetes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ansible Playbook Kubernetes

Usage

cp sample-hosts.ini hosts.ini
# Edit hosts.ini
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts.ini playbook.yml
cp kubeconfig ~/.kube/config
# Install CNI
#   - Calico: kubectl apply -f https://projectcalico.docs.tigera.io/manifests/calico.yaml
#   - Cilium: cilium install

With kubernetes_version

ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts.ini -e kubernetes_version=v1.31 playbook.yml

With kubernetes_kubeadm_init_extra_args

ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts.ini -e kubernetes_kubeadm_init_extra_args=--pod-network-cidr=172.16.0.0/16 playbook.yml
# or
ANSIBLE_HOST_KEY_CHECKING=False ansible-playbook -i hosts.ini -e kubernetes_kubeadm_init_extra_args=--skip-phases=addon/kube-proxy playbook.yml

About

My Ansible playbook for deploying Kubernetes

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published