2

Being a newbie I was trying to install calico with minikube.
I did downloaded it from https://github.com/kubernetes/minikube/releases/tag/v0.20.0 into my Ubuntu OS.

I tried the following commands to install it:

minikube start --network-plugin=cni

Then downloaded https://github.com/projectcalico/calico/blob/master/v2.6/getting-started/kubernetes/installation/hosted/calicoctl.yaml into my /usr/local/bin/ location of Ubuntu

Finally tried d to install by
kubectl apply -f calico.yaml

But after that command the terminal hunged up for a long time without any response.

I tried couple of time but it resulted the same.
Please help, I am not able to install it

Sri Arun
  • 133
  • 11

1 Answers1

1

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:

  1. policy-only mode
  2. 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

Anirban Sen Chowdhary
  • 8,233
  • 6
  • 39
  • 81