Installing, Configuring 3 Node Kubernetes(master) Cluster on CentOS 7.5 – Configuring Manifest and Kubelet Service – Part 4

1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)
Loading...

Installing, configuring 3 node Kubernetes(master) cluster on CentOS 7.5 – Creating kubernetes manifest and kubelet service

In Part 3 I described how to install and configure Flanneld, CNI plugin and Docker daemon, below I am continuing with with the installation and configuration of kubernetes manifest and kubelet service.

This is Part 4 – Installing and configuring kubernetes manifest and kubelet service.

Creating the kubernets master manifest

As you might know every Kubernetes Master consists of multiple components(process), it usually includes the below 4 process.

  1. API service
  2. Enterprise Controller
  3. Kube Proxy
  4. Kube Scheduler

In the next step, we are going to create the Kubernetes manifest(s) yaml files for each of the master server process.
Note: The main kubelet process reads the Kubernetes manifest directory at startup time (as well as watches later for changes) and will read/start each of the components listed at startup time.

So lets begin, below I am listing each of the manifest content, just create the below 4 files in /etc/kubernetes/manifests/.

Note: Make sure to replace/update the IP Address for each master.
The below examples are from Master1.
cat /etc/kubernetes/manifests/kube-apiserver.yaml

cat /etc/kubernetes/manifests/kube-controller-manager.yaml

cat /etc/kubernetes/manifests/kube-proxy-master.yaml

cat /etc/kubernetes/manifests/kube-scheduler.yaml

Create your kubeconfig.yaml, think of this this file like your authentication method.

Create the config.yaml file. this file is contains additional kubelet configuration.

Finally, create your kubelet service file.

Create the kubelet directory

We are finnaly ready to start the kubelet service.

To verify your pods runing/wokring run the below.
If all is working properly, you should see something like the below output.

To run all kubernetes process(api, scheduler, etc) I used the hyperkube image version v1.11.1.
You can always sreplace/update to the latest images, to get a list of the images avalble, you can run somthing like the below.

Optional You can add an alias for Docker management.

cat /etc/profile.d/aliases.sh
dps () { docker ps -a ; }
dl () { docker logs -f $1 & }
drm () { docker stop $1 && docker rm $1; }

If you reached this point you pride your self as completed a 3 master node Kubernetes cluster.

In Part 5 I will continue adding additional services like CoreDNS as part of the Kubernetes cluster, if you like to skip this optional part and jump directly to Part 6 adding worker nodes(coming soon) click here.

You might also like - Other related articles to Docker and Kubernetes / micro-service.

Like what you're reading? please provide feedback, any feedback is appreciated.

2
Leave a Reply

avatar
1 Comment threads
1 Thread replies
0 Followers
 
Most reacted comment
Hottest comment thread
2 Comment authors
Eli Kleinmanujnzxw Recent comment authors
  Subscribe  
newest oldest most voted
Notify of
ujnzxw
Guest
ujnzxw

Hi, thanks very much for your sharing!
If the other service file can be shared it were better, such as :
kube-apiserver.service,
kube-proxy.service,
kube-scheduler.service,
kube-controller-manager.service