getting started with project calico
TRANSCRIPT
![Page 1: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/1.jpg)
Anirban Sen Chowdhary
![Page 2: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/2.jpg)
Before we start, we should know what Project Calico is.As per Project Calico documentation, Calico is a Tigera open source project and is primarily maintained by the Tigera team, enabling cloud native application connectivity and policy. Calico integrates with major orchestration systems like Kubernetes, Apache Mesos, Docker, OpenStack and more to provide a seamless experience for developers and operators.
![Page 3: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/3.jpg)
The main feature of Calico are: Scalable, distributed control plane Policy-driven network security No overlay required Integrated with all major cloud platforms Widely deployed, and proven at scale
![Page 4: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/4.jpg)
In this blog, we will see how to start with Project Calico (https://www.projectcalico.org/) with Minikube (https://github.com/kubernetes/minikube).
To start with, we need Minikube (https://github.com/kubernetes/minikube), which is a tool that makes it easy to run Kubernetes locally.
![Page 5: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/5.jpg)
![Page 6: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/6.jpg)
So we will first get kubectl and minikube in our Ubuntu OS to start with.
We will use the following commands to install kubectl in our Ubuntu OS.
echo "Installing kubectl..........................."wget https://storage.googleapis.com/kubernetes-
release/release/v1.4.4/bin/linux/amd64/kubectlchmod +x kubectlsudo mv kubectl /usr/local/bin/kubectl
The above command will get you kubectl installed into the /usr/local/bin location with required access to the file.
![Page 7: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/7.jpg)
Simmilarly, the following command will install minikube in Ubuntu OS under /usr/local/bin location with requered access to the file.
echo "Installing minikube.........................."
curl -Lo minikube https://storage.googleapis.com/minikube/releases/v0.15.0/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/
![Page 8: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/8.jpg)
![Page 9: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/9.jpg)
We can now configure Calico in Policy-only mode. In this mode Calico is not setting up the networking but uses the 'host-local' plugin for IPAM so depends on K8s for IPAM. The minikube start command that can configure is:
minikube start --memory 2096 --network-plugin=cni --host-only-cidr=192.168.0.0/16 \
--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
![Page 10: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/10.jpg)
We can see minikube getting started:
![Page 11: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/11.jpg)
Next, we will see it has started successfully:
![Page 12: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/12.jpg)
Now, we need to get calico.yaml from https://docs.projectcalico.org/v2.6/getting-started/kubernetes/installation/hosted/kubeadm/1.6/calico.yaml location to install Calico from calico.yaml locally.
![Page 13: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/13.jpg)
After getting calico.yaml locally, we can use following commands to install Calico and a single node etcd with kubectl:
kubectl apply -f calico.yaml
We can see now as below:
![Page 14: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/14.jpg)
To confirm that all of the pods are running with the following command:
kubectl get pods --all-namespaces
![Page 15: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/15.jpg)
We need to wait until each pod has the STATUS of Running.
![Page 16: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/16.jpg)
If we go back to the location /usr/local/bin/ where all our files are stored and installed, we can see as below:
![Page 17: Getting started with project calico](https://reader031.vdocument.in/reader031/viewer/2022021923/5a6479a87f8b9a2c568b482f/html5/thumbnails/17.jpg)