Kubernetes-Installtion & Setup Some impoartant commands

-- after installing kubedm - cluster detup - {[MASTER NODE]}

sudo kubeadm init --pod-network-cidr=192.168.0.0/16 --apiserver-advertise-address={private ip}

-- Install a Pod Network Add-on: {MUST & IMPOARTANT}

kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml

======================================================================================================================================

for {[ conecting worker node]}

sudo kubeadm join {ip address of the master }:6443 --token {token} --discovery-token-ca-cert-hash{hash}

Control plane node isolation

kubectl taint nodes --all node-role.kubernetes.io/control-plane-

======================================================================================================================================================================================

ERROR WITH SOLUTION

$Bridge and IP Forwarding:

ERROR---

[ERROR FileContent--proc-sys-net-bridge-bridge-nf-call-iptables]: /proc/sys/net/bridge/bridge-nf-call-iptables does not exist [ERROR FileContent--proc-sys-net-ipv4-ip_forward]: /proc/sys/net/ipv4/ip_forward contents are not set to 1

SOLUTION -

sudo sysctl net.bridge.bridge-nf-call-iptables=1 sudo sysctl net.ipv4.ip_forward=1

$CRI (Container Runtime) is not Running:

ERROR -

[ERROR CRI]: container runtime is not running: output: time="2023-10-28T01:57:47Z" level=fatal msg="validate service connection: validate CRI v1 runtime API for endpoint "unix:///var/run/containerd/containerd.sock": rpc error: code = Unavailable desc = connection error: desc = "transport: Error while dialing: dial unix /var/run/containerd/containerd.sock: connect: no such file or directory""

SOLUTION -

sudo apt-get update sudo apt-get install -y docker.io sudo systemctl restart docker

Last updated