
- #INSTALL KUBERNETES CLUSTER ON CENTOS INSTALL#
- #INSTALL KUBERNETES CLUSTER ON CENTOS CODE#
Add the following mapping to the /etc/hosts file to allow proper DNS resolution across all hosts. Using hostname resolution will help clarify the relationship between all the hosts.
#INSTALL KUBERNETES CLUSTER ON CENTOS INSTALL#
yum -y install docker docker-logrotate kubernetes etcd flanneld Again, these packages should be installed on all hosts including the master and minion hosts. Now the Kubernetes package and dependencies can be installed. The Community Build System YUM repository, virt7-testing, will need to be added to all Kubernetes hosts. The latest binaries can be compiled from source, but the CentOS Community Build System usually has current binaries and simplifies the install onto Enterprise Linux distributions.
#INSTALL KUBERNETES CLUSTER ON CENTOS CODE#
Kubernetes is currently under active development and there are frequent changes to the code base. The following Configure Kubernetes Hosts steps should be performed on all of the hosts including the master and minion hosts. Here is a screenshot of the infrastructure layout used in this tutorial: Note: The public IP addresses are completely optional and depend on whether the pods will be exposed publicly. The instructions may work with later versions, but the configuration could vary as Kubernetes is rapidly evolving. Note: The versions specified were the latest available while drafting this tutorial.
CentOS 7 (possibly Red Hat Enterprise Linux 7). As the Kubernetes master is not typically running containers, the Flannel service is not required to run on the master. This allows the containers which are typically on their own internal subnet to communicate across multiple hosts. Note: Flannel, or another network overlay service, is required to run on the minions when there is more than one minion host. Docker - An API and framework built around Linux Containers (LXC) that allows for the easy management of containers and their images. Proxy - Manages the container network (IP addresses and ports) based on the network service manifests received from the Kubernetes master. Kubelet - Host level pod management determines the state of pod containers based on the pod manifest received from the Kubernetes master. The minion hosts will run the following services to manage containers and their network. Flannel - A network overlay that will allow containers to communicate across multiple hosts. etcd - A distributed key value store where Kubernetes stores information about itself, pods, services, etc. Scheduler - Finds a suitable host where new pods will be reside. Replication Controller - Ensures the number of specified pod replicas are always running by starting or shutting down pods. API Server - The REST API endpoint for managing most aspects of the Kubernetes cluster. It is suggested that the Kubernetes overview document be reviewed before continuing forward.Ī single master host will manage the cluster and run several core Kubernetes services. Understanding the basic Kubernetes concepts and multi-node deployment architecture will make the installation and management much easier. This tutorial will describe the installation and configuration of a multi-node Kubernetes cluster on CentOS 7. Kubernetes is an open source container management system that allows the deployment, orchestration, and scaling of container applications and micro-services across multiple hosts.