kubernetesgentookubeconfig

creating a proper kubeconfig file for a 2 node gentoo linux kubernetes cluster


I have two servers at my home with Gentoo Linux ~amd64.I would like to install Kubernetes on them to play with it a bit.

Gentoo now packages all the Kubernetes related dependencies under one package called sys-cluster/kubernetes and the latest version available at the moment is 1.18.3.

the last time I played with Kubernetes was several years ago and I think I completely forgot everything.

so I installed kubernetes on both servers. since I use systemd and the package contains only kubelet systemd service I created systemd init scripts for also kube-apiserver, kube-controller-manager, kube-proxy and kube-scheduler.

now this package also comes with kubeadm but I would like to know how to install and configure kubernetes manually.

now I want to create a kubeconfig file for my cluster configuration. I googled and found the following url: http://docs.shippable.com/deploy/tutorial/create-kubeconfig-for-self-hosted-kubernetes-cluster/

the first step is Make sure you can access the cluster but I thought I wanted to create kubeconfig in order for the services to properly know how to access my cluster!

this web site already talks about secrets that where already configured which aren't.. i'm starting from scratch and this is not probably the way to go.

In general I want to know how to properly create a kubeconfig file for my setup, then i'll configure the services to use this kubeconfig file and go on from there.

so any information regarding this issue would be greatly appreciated.


Solution

  • so I asked this also in Kubernetes slack channel and they provided me this project: https://github.com/kelseyhightower/kubernetes-the-hard-way

    it's a documentation project on how to configure kubernetes the hard way, in the documentation they set it up in google cloud, but it's easy to understand what they did on cloud and how to configure the same on your network.