Install and Setup Kubernetes on CentOS

Exported on 25-Sep-2021 13:40:50

Install Kubernetes on CentOS Linux

This Blueprint Installs Kubernetes on CentOS based operating systems

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.

Pre-Blueprint Attune setup
  1. On the Inputs tab, create a Linux node for the host you wish to install the stack on.
  2. On the Inputs tab, create Linux credentials to connect to the host you wish to install the stack on.
Supported Operating Systems:
  • CentOS 7 and 8
Steps Involved
  • Install Docker on the target machine.
  • Configure Kubernetes yum repository.
  • Install Kubernetes and related tools.

Parameters

Name Type Script Reference Default Value Comment
Linux Node Linux / Unix Server linuxNode
Linux User Linux OS Credential linuxUser

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