+ All Categories
Home > Technology > Getting started with project calico

Getting started with project calico

Date post: 21-Jan-2018
Category:
Upload: anirban-sen-chowdhary
View: 138 times
Download: 0 times
Share this document with a friend
17
Anirban Sen Chowdhary
Transcript
Page 1: Getting started with project calico

Anirban Sen Chowdhary

Page 2: Getting started with project calico

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

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

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
Page 6: Getting started with project calico

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

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
Page 9: Getting started with project calico

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

We can see minikube getting started:

Page 11: Getting started with project calico

Next, we will see it has started successfully:

Page 12: Getting started with project calico

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

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

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

We need to wait until each pod has the STATUS of Running.

Page 16: Getting started with project calico

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

Recommended