How to use kubeconfig on Linux
After you have successfully downloaded Kube Config on the Deka GPU Service Portal. The following is a guide to using Kube Config on the Linux operating system.
Configure kubectl
Download the latest version of kubectl in use and run the following command line in your terminal.
curl -LO "https://dl.k8s.io/release/$(curl -L -s https://dl.k8s.io/release/stable.txt)/bin/linux/arm64/kubectl"
validasi berkas binary dengan menjalankan sintak berikut.
curl -LO "https://dl.k8s.io/release/v1.28.15/bin/linux/amd64/kubectl.sha256"
echo "$(cat kubectl.sha256) kubectl" | sha256sum --check
If validation of the binary file is successful, it displays kubectl status: OK. Install kubectl by running the syntax below.
sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl
To ensure the version used is the latest version, run the following syntax.
kubectl version --client
Set-up kubeconfig
Create a new directory named .kube in the home directory by executing the following syntax.
mkdir ~/.kube
After creating a new directory, create a new file in the kube directory with the name config which will store the kubernetes configuration file that you previously downloaded via the Deka GPU Portal Service.
nano ~/.kube/config
Open the kube-config.yaml file previously downloaded via the Deka GPU Portal Service using the text editor you have on your computer. If you haven't downloaded the kube-config file, you can follow the Download kubeconfig subsection. Copy the contents of the kube-config.yaml file to the config file as shown below.
To save the vm.yaml file by pressing CTRL+O, then press Enter, and exit with CTRL+X. Check that the pods in the cluster have been successfully accessed by running the following syntax.
kubectl get pod
Last updated