Install and Configure Kubernetes on CentOS

Exported on 31-Aug-2021 17:20:00


About Kubernetes

Kubernetes, also known as K8s, is an open source system that automates the deployment and management of containerized applications. Kubernetes builds upon a decade and a half of experience that the original developers of Google's Borg Project brought to this problem space. It was initially designed by engineers who had worked on Borg (and Google's other container platform, Omega), and who had built the tooling required to deploy and operate services such as Gmail, Search and Google Maps.

The Kubernetes open source community has been driven by significant contributions from both individual volunteers and large companies such as Google, Red Hat, IBM and Microsoft.

Installs and configure Kubernetes on CentOS, Fedora and Red Hat systems.

This documentation will show you how to install and configure Kubernetes on CentOS. It is actually really easy to set up once Docker is installed, so this should be pretty simple.

Parameters

Name Type Script Reference Default Value Comment
s1 Linux / Unix Server s1
s1c Linux OS Credential s1c

1 - Install Docker - CentOS

Installs and configures Docker community edition

The connection details have changed from the last step.

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
# Update yum repository
sudo yum check-update

# Install docker
curl -fsSL https://get.docker.com/ | sh

2 - Start and Enable Docker Service

Configures docker to launch at startup and starts the service.

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
# Enable docker
sudo systemctl enable docker
sudo systemctl start docker
sudo systemctl status docker

3 - Upload Kubernetes Repo Config

Uploads Kubernetes repo config file for yum

Login as user on node

Connect via SSH
ssh user@hostname
Deploy archive kubernetes.repo.zip to remote path uploads
  1. Locate Files archive "kubernetes.repo.zip", This can be downloaded from Attune
  2. Copy the Files archive to the server
  3. Extract the root of the Files archive to uploads, relative to the home directory
  4. Check that the files are in the correct location

4 - Install Kubernetes Tools

Installs Kubernetes tools, used to launch and manage Kubernetes clusters

Login as user on node

Connect via SSH
ssh user@hostname
This is a Bash Script make sure you run it with bash -l from a terminal session
# Move repo file
sudo mv ~/uploads/kubernetes.repo /etc/yum.repos.d/

# Install Kubernetes tools
sudo yum -y install kubeadm

kubeadm version