Install Kubernetes Control Client - caprivm/virtualization GitHub Wiki

caprivm ([email protected])

Updated: January 25, 2023

Description

This page shows how to install some Kubernetes cluster management tools such as kubectl. Please consider that this tool are operational on an already Kubernetes cluster. You can install it using kubespray as suggested by this link. The installation tests were done on a server with the following characteristics:

Feature Value
OS Used Ubuntu 18.04 LTS
vCPU 2
RAM (GB) 4
Disk (GB) 50
Home user ubuntu
Number of NICs 2 (ens160, ens192)
Kubectl version v1.23.7

The contents of the page are:

Install kubectl

Install kubectl in your server using the next steps:

sudo apt-get update
sudo apt-get install -y ca-certificates curl apt-transport-https curl
sudo curl -fsSLo /etc/apt/keyrings/kubernetes-archive-keyring.gpg https://packages.cloud.google.com/apt/doc/apt-key.gpg
echo "deb [signed-by=/etc/apt/keyrings/kubernetes-archive-keyring.gpg] https://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee /etc/apt/sources.list.d/kubernetes.list
sudo apt-get update
sudo apt-get install -y kubectl

For testing, be sure that you copy the config file from one of your master nodes to the ~/.kube/config file in your server. Use the next commands to test installation:

kubectl version --short
# Client Version: v1.23.7
# Server Version: v1.23.7
kubectl get pods
# No resources found in default namespace.
⚠️ **GitHub.com Fallback** ⚠️