First of all, I will suggest to get the latest minikube
version from here.
Once you are done getting your latest minikube
, there are 2 ways to install and run Calico with minikube
:
- policy-only mode
- networking (includes policy) mode
With policy-only mode without networking:
minikube start --network-plugin=cni --host-only-cidr 172.17.17.1/24 \
--extra-config=kubelet.PodCIDR=192.168.0.0/16 \
--extra-config=proxy.ClusterCIDR=192.168.0.0/16 \
--extra-config=controller-manager.ClusterCIDR=192.168.0.0/16 \
--extra-config=controller-manager.CIDRAllocatorType=RangeAllocator \
--extra-config=controller-manager.AllocateNodeCIDRs=true
Then use kubectl apply -f https://github.com/projectcalico/calico/blob/master/v2.6/getting-started/kubernetes/installation/hosted/kubernetes-datastore/policy-only/1.7/calico.yaml
or with networking (which also includes policy) mode which configures the networking and provides policy:
minikube start --network-plugin=cni --host-only-cidr 172.17.17.1/24 \
--extra-config=kubelet.PodCIDR=192.168.0.0/16 \
--extra-config=proxy.ClusterCIDR=192.168.0.0/16 \
--extra-config=controller-manager.ClusterCIDR=192.168.0.0/16
then kubectl apply -f https://github.com/projectcalico/calico/blob/master/v2.6/getting-started/kubernetes/installation/hosted/kubernetes-datastore/calico-networking/1.7/calico.yaml
For more ref:- https://github.com/projectcalico/calico/issues/1013#issuecomment-325689943
Hope that help you to start