Flannel

Install Flannel in latest version into CNI-enabled Kubernetes:

curl -L https://github.com/flannel-io/flannel/releases/latest/download/kube-flannel.yml -o flannel-custom-resources.yaml

Change default CIDR 10.244.0.0/16 to 192.168.0.0/16:

cat flannel-custom-resources.yaml | sed 's/"Network": "10.244.0.0\/16"/"Network": "192.168.0.0\/16"/' > flannel-custom-resources-tmp.yaml
mv flannel-custom-resources-tmp.yaml flannel-custom-resources.yaml
kubectl apply -f flannel-custom-resources.yaml
namespace/kube-flannel created
serviceaccount/flannel created
clusterrole.rbac.authorization.k8s.io/flannel created
clusterrolebinding.rbac.authorization.k8s.io/flannel created
configmap/kube-flannel-cfg created
daemonset.apps/kube-flannel-ds created

Verify pods and daemon set:

kubectl get pods,ds -n kube-flannel
NAME                        READY   STATUS    RESTARTS   AGE
pod/kube-flannel-ds-6dfbm   1/1     Running   0          38s
pod/kube-flannel-ds-6ktkf   1/1     Running   0          38s
pod/kube-flannel-ds-tlp5r   1/1     Running   0          38s

NAME                             DESIRED   CURRENT   READY   UP-TO-DATE   AVAILABLE   NODE SELECTOR   AGE
daemonset.apps/kube-flannel-ds   3         3         3       3            3           <none>          38s