Install Kubernetes on Red Hat Linux (RHEL 7) - kubernetes

I am trying to install Kubernetes on Red Hat Linux (RHEL 7) . Any advice on the best and easiest way to do this ? I would not like to use minikube. Thank you very much

kubeadm is the way to go for installing kubernetes on RHEL. Though in alpha, it works for most of the use cases.
You can find the installation instructions on the kubeadm installation page and steps to use it on the using kubeadm page.

Best and easy is in the eye of the beholder, but maybe you want to review the install options I tried to describe and categorize in the post Kubernetes: A Little Guide to Install Options against your requirements?

this link [https://www.linuxtechi.com/install-kubernetes-1-7-centos7-rhel7/ ] will help you.
1).there is some dependency of Kubernetes make sure that you use docker-engine 1.13.0 (tested).
2).write swapoff -a in your .bashrc file to off swap memory.
3).setup the firewall rules accordingly.
Happy Learning :)..

KubeSpray !
Gives you the ability to install addons as well on baremetal and in the cloud and is highly customizable because its all Ansible based.
Initially you just populate the inventory file and choose the options that you want in the variable files and thats it.
The ansible playbook does all the rest for you. And if you want to scale up, there is a playbook for that too.

Related

Install kubernetes on debian stretch server without systemd

I am trying to install Kubernetes on Debian 9 (stretch) server, which is on cloud and therefore can't do virtualization. And it doesn't have systemd. Also, I'm trying for really minimal configuration, not big cluster.
I've found Minikube, https://docs.gitlab.com/charts/development/minikube/index.html which is supposed to run without virtualization using docker, but it requires systemd, as mentioned here https://github.com/kubernetes/minikube/issues/2704 (and yes I get the related error message).
I also found k3s, https://github.com/rancher/k3s which can run either on systemd or openrc, but when I install openrc using https://wiki.debian.org/OpenRC I don't have the "net" service it depends on.
Then I found microk8s, https://microk8s.io/ which needs systemd simply because snapd needs systemd.
Is there some other alternative or solution to mentioned problems? Or did Poettering already bribed everyone?
Since you are well off the beaten path, you can probably just run things by hand with k3s. It's a single executable AFAIK. See https://github.com/rancher/k3s#manual-download as a simple starting point. You will eventually want some kind of service monitor to restart things if they crash, if not systemd then perhaps Upstart (which is not packaged for Deb9) or Runit (which itself usually runs under supervision).

Facing issue to setup kubernetes on CentOS 7.3(Master) and Ubuntu 16.04

Is kubernetes compatable with CentOS 7.3 version?
I am trying to setup Kubernetes master with Centos7.3 and nodes with ubuntu 16.04.
Please let me know is OS versions causing issues in my case?if yes let me know which OS version can be used to bring setup up as mentioned in guide.
I followed instruction as mentioned in guide https://kubernetes.io/docs/getting-started-guides/centos/centos_manual_config/#warning but some or the other component fail to work.
Please let me know anything required from my end to dig deeper.
Thanks,
Surya
Kubernetes support mixed version of OS. follow the kubeadm cluster setup process, it will be easy to get started.
follow this document.
https://kubernetes.io/docs/setup/independent/create-cluster-kubeadm/

Can we install Kubernetes in a complete offline mode with kubeadm?

I need to install a Kubernetes cluster in complete offline mode. I can follow all the instructions at http://kubernetes.io/docs/getting-started-guides/scratch/ and install from binaries but that seems like an involved setup. The installation using kubeadm is pretty easy but I don't see any docs on whether I can install the cluster by downloading the .deb packages locally.
Any pointers to that direction are much appreciated.
I don't think that anyone has documented this yet. The biggest thing needed is to get the right images pre-loaded on every machine in the cluster. After that things should just work.
There was some discussion of this in this PR: https://github.com/kubernetes/kubernetes/pull/36759.
If I had the bandwidth I'd implement a kubeadm list-images so we could do docker save $(kubeadm list-images) | gzip > kube-images.tar.gz. You could manually construct that list by reading code and such.
Can we install Kubernetes in a complete offline mode with kubeadm?
Yes, I've already set up several offline clusters (1.15.x) with ansible and kubeadm. Mainly you need to prepare the following things in a USB drive and bring it to your offline environment.
.deb/.rpm files to install ansible
.deb/.rpm files to install docker
.deb/.rpm files to install kubeadm, kubectl, kubelet
Docker images of kubernetes cluster (You can find that with kubeadm config images list)
Docker images of kubernetes addons (flannel/calico, dashboard, etc)
Your ansible playbooks
The installation steps are as follow:
Install ansible with dpkg or rpm (manully)
Install docker with dpkg or rpm (via ansible tasks)
Install kubeadm, kubectl, kubelet with dpkg or rpm (via ansible tasks)
docker load all the docker images (via ansible tasks)
Run kubeadm init and kubeadm join (via ansible tasks)
There may be lots of details here. Feel free to leave your comments.

How to install Kubernetes from release binary on Centos 7

I've downloaded kubernetes binary release 1.4.1 and want to install it on my Centos 7 cluster. The official guide is based on "yum install ...".
Is there any guide/instruction show me how to install and configure k8s using a binary release?
Highly appreciate your help.
I was struggling with the same setup too. After hours of googling I decided to go the kubeadm way.
wget https://github.com/kubernetes/release/archive/master.zip
unzip master.zip
cd release-master/rpm && ./docker-build.sh
This produced three rpm packages of v1.4.3. After installing packages, simply run kubeadm init and that is all.
In addition, there is some nice documentation for CoreOS , I tried to follow this first, but then I got compatibility issues in configuration between CentOS and CoreOS. Hope this helps.

How do you use provision a centOS vm on spinnaker?

Out of the box spinnaker does not come with centOS as an option when creating a pipeline. How do you make centOS an option and complete both the bake and deploy steps?
i had this same issue. after digging around i found that you actually have to edit the Rosco config.
https://github.com/spinnaker/rosco/blob/master/rosco-web/config/rosco.yml
you'll need to make your own entry. i also found that even after adding a centos base image, packer still had problems w/ RPM because of the install_packages.sh provisioning script. its missing RPM support in the AMI Spinnaker says to use in its documentation. the one im using is here...
https://github.com/spinnaker/rosco/blob/master/rosco-web/config/packer/install_packages.sh