over 5 years ago

In my last post http://anirban-blog.logdown.com/posts/3392189-getting-started-with-project-calico-with-k8 we had a demonstration of Project Calico in Policy-only mode.

In this post, we will see Project Calico in Calico networking mode.
So as we know, we first require kubectl and minikube as we seen in that last post.

We will start minikube with following command:

minikube start --memory 2096 --network-plugin=cni --host-only-cidr 172.17.17.1/24 \
--extra-config=kubelet.ClusterCIDR=192.168.0.0/16 \
--extra-config=proxy.ClusterCIDR=192.168.0.0/16 \
--extra-config=controller-manager.ClusterCIDR=192.168.0.0/16


We can see in the following screen:


and after some time it get started as below:

In this mode Calico handles configuring the networking and provides policy.

After kubernetes is started with the above command then it is possible to install Calico though some slight modifications will need to be made to the manifests.
The following commands can be used to pull down a manifest, update it, and then apply the manifest:
sudo curl -O -L https://docs.projectcalico.org/v2.4/getting-started/kubernetes/installation/hosted/kubeadm/1.6/calico.yaml
We can see as below:

Then update it as follow:
sudo sed -i -e '/nodeSelector/d' calico.yaml
We can see that below:

Followed by following command:
sudo sed -i -e '/node-role.kubernetes.io\/master: ""/d' calico.yaml
and we can see as below:

And then the following:
sudo sed -i -e 's/10\.96\.232/10.0.0/' calico.yaml
Which we can see below:

And we can use following commands to install Calico:
kubectl apply -f calico.yaml
We can see the response below:

To confirm that all of the pods are running with the following command:
kubectl get pods --all-namespaces

We can see below:

So, we can see easily how Calico handles configuring the networking and provides policy.
This is Calico in networking mode.

 
over 5 years ago

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.

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

In this blog, we will see how to start with Project Calico with Minikube.

To start with, we need Minikube, which is a tool that makes it easy to run Kubernetes locally.

Getting started:

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/kubectl
chmod +x kubectl
sudo mv kubectl /usr/local/bin/kubectl

The above command will get you kubectl installed into the /usr/local/bin location with requered access to the file.

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/

Policy-only mode (Kubernetes networking)

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

We can see minikube getting started:

Next, we will see it has started successfully:

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.

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:

To confirm that all of the pods are running with the following command:
kubectl get pods --all-namespaces

You can see below:

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

If we go back to the location /usr/local/bin/ where all our files are stored and installed, we can see as below:

 
over 5 years ago

Cloud technology which enables different companies and organistions to use and consume a compute resource, such as a virtual machine (VM), storage service or an application or as a utility is the delivery of on-demand computing resources which covers from applications to data centers over the internet and on a pay as per useage basis.
In the simplest terms, we can say that cloud is storing and accessing Data and programs securely over the Internet server instead of our local computer's hard drive.

Some examples we can see Google Drive, Amazon Cloud Drive, Apple iCloud etc.
In todays world, Cloud networking which is based on the concept of cloud computing, where centralized computing resources are shared within the customers or clients and in this cloud networking, the network can be shared as well as the computing resources.

Some advantages are:

  1. We can rapidly start using innovative business apps
  2. Data is protected and no Data is lost if our computer breaks or down, as data is in the cloud.
  3. It doesn't need any effort from our part to maintain or manage it.
  4. Data is available 24X7 and can be access from any part of the world.
  5. Companies can scales up or down quickly and easily to meet demand.
  6. User or Client needs to pay as per their use.

Since right now the entire world is going to shift it's focus to Cloud due to all these advantage.
Day by day due to it's increasing demands, the technology is getting affordable every one's reach.
Now, instead of paying one big fees for it's support and maintainence, businesses will have to pay per user for support privileges, based on how quickly they will get a response.
The organisation also shifting their focus on Cloud as it is available and accesible from any part of the world.

It may soon happen that over the next few years, the cloud-based developers community may increase as well as the number of new cloud-based solutions which will bring a new era of cloud based software solution.
It may also happen that many big companies and organisation may likely to include the Mobile Cloud scenario, where the latest mobile devices and cloud computing services will offer a flexible business technology solution and mobile Cloud solution is already comming under limelight now.
The Cloud venders are also offering different business solution as per needs while providing different security mechanism for Data as well as different cloud based networking solution to bridge the gap between different cloud services.
Project Calico is one of the example, which provides open source virtual networking solution, high-scale network fabric for Cloud as well as enables the implementation scalable, standards-based, cloud infrastructures.

As the Cloud technology grows day by day, we can definately see a new dimension on Cloud based services appearing replacing the old services pattern and lots of providers providing different cloud based services like hosting, storages, network-based, cloud based security etc.