Configuring Kubernetes 3 Node Cluster On CoreOS Kubelet Manifests – Part 3

1 Star2 Stars3 Stars4 Stars5 Stars (1 votes, average: 5.00 out of 5)

In the previous post I went through how to configure Etcd and Flannel, below I am continuing with the Kubelet manifests configuration.

I divided the Kubernetes configuration into parts outlined below (still working progress).

Note: An up-to-date example is available on my GitHub project page, or generate your own Kubernetes configuration with the Kubernetes generator available here on my GitHub page.

This is part 3 – Configure Kubernetes manifests for controller, api, scheduler and proxy.

Copy Kubernetes certificates
For the most part I will re-use the SSL certificates generated in part 1 , but for the kubelet service I going to use the same certificates but with in a a different location and name.

Note: I created the /etc/kubernetes/ssl, since this directory is the default used/mounted/specified in the /usr/lib/coreos/kubelet-wrapper. ultimately I could of added /var/lib/etcd/ssl to the mount options and re-use the certificates, I decided to leave the defaults and copy the certificates with a new name of worker*. for the manifests I used the /var/lib/etcd/ssl. more on that is below.

Create required kubernetes directory’s.

Create the kubernetes manifests(controller, api, proxy, scheduler)

Next, we are going to create the kubernetes manifests.
The way kubernetes works, once you start the kubernetes service(kubelet) with the proper parameters(more on the parameters in part 4), the kubelet process will automatically start/run all the manifests/services, in our case we are using hyperkube for the controller, api, proxy, scheduler.

There are many ways to grab a sample manifest, however below are the manifests I used which worked for me. however if you would like to get a sample manifest you can do so by fowling the below.
Download a copy of matchbox with git.

Next, run the below and you will get a copy of all the manifests.

Below are the manifests I used.
Lets create the kube-controller-manager.
cat /etc/kubernetes/manifests/kube-controller-manager.yaml

Lets create the kube-apiserver.
cat /etc/kubernetes/manifests/kube-apiserver.yaml

Lets create the kube-scheduler.
cat /etc/kubernetes/manifests/kube-scheduler.yaml

Lets create the kube-proxy.
cat /etc/kubernetes/manifests/kube-proxy.yaml

Create the kubelet.env and worker-kubeconfig.yaml
cat /etc/kubernetes/kubelet.env

cat /etc/kubernetes/worker-kubeconfig.yaml

ignition config
If you are using ignition config, just add the below to your ignition config file.

You are now ready to move to the next step, Finalizing the kubelet configuration RKT, Flannel+CNI – in part 4.

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

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

Leave a Reply

1 Comment threads
1 Thread replies
Most reacted comment
Hottest comment thread
2 Comment authors
Eli KleinmanDanielG Recent comment authors
newest oldest most voted
Notify of

This is the tutorial I was looking for! I like that you provide the ignition file components.

For this particular phase of the tutorial, it would be nice if you included a “this is how you test this” section like you did at the end of the previous sections.

Also, I thought I would point out that the ignition code on this page doesn’t include the certificates that you are reusing from etcd.