First Steps

Download and Installation

Install and Set Up kubectl on Linux

We will download the binary from Kubernetes using the following command:

curl -LO "<https://dl.k8s.io/release/$>(curl -L -s <https://dl.k8s.io/release/stable.txt>)/bin/linux/amd64/kubectl"

This will put the binary file we will use to control our clusters within the directory we executed this command in.

debian@borekserver:~$ ls
index.html  **kubectl**  projecto  vps-2bd77d01.vps.ovh.net-snapshot

We will use the install command so we are able to use it from wherever in the system, giving it permission to execute (755).

sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

Now we can check if our install was successful.

debian@borekserver:~$ kubectl version --client
WARNING: This version information is deprecated and will be replaced with the output from kubectl version --short.  Use --output=yaml|json to get the full version.
Client Version: version.Info{Major:"1", Minor:"27", GitVersion:"v1.27.1", GitCommit:"4c9411232e10168d7b050c49a1b59f6df9d7ea4b", GitTreeState:"clean", BuildDate:"2023-04-14T13:21:19Z", GoVersion:"go1.20.3", Compiler:"gc", Platform:"linux/amd64"}
Kustomize Version: v5.0.1

Connection to OVHcloud’s Cluster

Configuring kubectl on an OVHcloud Managed Kubernetes cluster

First, we need to access to our cluster in OVHcloud’s control panel. Here we will find the kubeconfig file, which we need to download by clicking on it.

Untitled

Uploading the File to your Instance

~ or wherever you are going to use kubectl from.

Option One

Upload the file to Plik and download the file from there using wget