Skip to content

A guide to provision Kubernetes cluster using kubeadm in local virtual machine. (No cloud provider vm is required) πŸš€πŸš€πŸš€

License

Notifications You must be signed in to change notification settings

pkbhowmick/kubeadm-cluster-provisioning

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 

Repository files navigation

kubeadm-cluster-provisioning

Provision kubernetes cluster using kubeadm in local virtual machine(Without cloud provider)

Run virtual machine locally and ssh into it.

  • Install oracle virtual box and run ubuntu server 22.04 LTS. Installation guide.

  • Recommended vm system requirements:

    • CPU >= 2 cores
    • Memory >= 2 GB
    • Storage >= 20GB

Provision k8s cluster (Single node)

Permanently disable swap. Updates on swap:

swapoff -a; sed -i '/swap/d' /etc/fstab
 kubeadm init --pod-network-cidr=192.168.0.0/16 --ignore-preflight-errors=all
  • Install Calico for Pod network add on.

  • Untainted Node to run pods in Control plane. [Ref]

kubectl taint nodes --all node-role.kubernetes.io/control-plane- node-role.kubernetes.io/master-
  • Use cluster
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config

Alternatively, if you are the root user, you can run:

export KUBECONFIG=/etc/kubernetes/admin.conf
  • Check the pods.
kubectl get pods -A

Acknowledgement

A big thanks to Emruz Hossain bhai for the k8s provision workflow contents.

Resources

About

A guide to provision Kubernetes cluster using kubeadm in local virtual machine. (No cloud provider vm is required) πŸš€πŸš€πŸš€

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages