I needed to switch from calico to flannel. Here is the recipe I followed to setting up Kubernetes 1.25.2 on a Power 10 using Flannel.
Switching to use Kubernetes with Flannel on RHEL on P10
- Connect to both VMs (in split terminal)
ssh root@control-1
ssh root@worker-1
- Run Reset (acknowledge that you want to proceed)
kubeadm reset
- Remove Calico
rm /etc/cni/net.d/10-calico.conflist
rm /etc/cni/net.d/calico-kubeconfig
iptables-save | grep -i cali | iptables -F
iptables-save | grep -i cali | iptables -X
- Initialize the cluster
kubeadm init --cri-socket=unix:///var/run/crio/crio.sock --pod-network-cidr=192.168.0.0/16
- Setup kubeconfig
mkdir -p $HOME/.kube
sudo cp -i /etc/kubernetes/admin.conf $HOME/.kube/config
sudo chown $(id -u):$(id -g) $HOME/.kube/config
- Add the plugins:
curl -O https://github.com/containernetworking/plugins/releases/download/v1.1.1/cni-plugins-linux-ppc64le-v1.1.1.tgz -L
cp cni-plugins-linux-ppc64le-v1.1.1.tgz /opt/cni/bin
cd /opt/cni/bin
tar xvfz cni-plugins-linux-ppc64le-v1.1.1.tgz
chmod +x /opt/cni/bin/*
cd ~
systemctl restart crio kubelet
-
Download https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.yml
-
Edit the containers to point to the right instance, per the notes in the yaml to the ppc64le manifests
-
Update
net-conf.json
net-conf.json: |
{
"Network": "192.168.0.0/16",
"Backend": {
"Type": "vxlan"
}
}
- Join the Cluster
kubeadm join 1.1.1.1:6443 –token y004bg.sc65cp7fqqm7ladg
–discovery-token-ca-cert-hash sha256:1c32dacdf9b934b7bbd6d13fde9312a35709e2f5849008acec8f597eb5a5dad9
- Add role to the workers
kubectl label node worker-01.ocp-power.xyz node-role.kubernetes.io/worker=worker
Ref: https://gist.github.com/rkaramandi/44c7cea91501e735ea99e356e9ae7883 Ref: https://www.buzzwrd.me/index.php/2022/02/16/calico-to-flannel-changing-kubernetes-cni-plugin/