With years of experience in managing highly scalable products, google has released kubernetes an open source project which manages containerized applications across multiple hosts. Kubernetes is actively developed with more than 700 active developers. Kubernetes can be setup over any cloud platform any os. Its is based on etc which is a key value store that provides shared configuration and service discovery for clusters.
Kubernetes consists of four core services:
- controll manager
So all we have to do is run these services providing the servers ip addresses and the application we want to deploy.
Cluster : A cluster is a set of physical or virtual machines and other infrastructure resources used by Kubernetes to run your applications. Kubernetes can run anywhere.
Node : A node is a physical or virtual machine running Kubernetes, onto which pods can be scheduled.
Pod : Pods are a colocated group of application containers with shared volumes. They're the smallest deployable units that can be created, scheduled, and managed with Kubernetes. Pods can be created individually, but it's recommended to use a replication controller even if creating a single pod.
Replication controller :Replication controllers manage the lifecycle of pods. They ensure that a specified number of pods are running at any given time, by creating or killing pods as required.
Service : Services provide a single, stable name and address for a set of pods. They act as basic load balancers.
Label : Labels are used to organize and select groups of objects based on the key:value pairs.
Configuring Kubernetes on Fedora:
At least we need to have two hosts, and each host should have docker configured. Here we assume fed-master as host1 which acts as master and fed-node being the slave on host2.
Install kubernetes on both fed-master and fed-node:
Install etcd on fed-master:
Configure etcd, edit /etc/kubernetes/config
Disable iptable service:
To avoid firewall issues with docker we are disabling iptables service.
Configure kubernetes on fed-master:
Create /var/run/kubernetes on master:
Now lets start the services:
Create following node.json file on Kubernetes master:
the above node.json file illustrates the fed-node structure, it does not run the node so you will get unknown status as shown below:
Now configure the kubelet on the fed-node:
Start the services on host2(fed-node):
That's it to check whether the node is up and ready execute: