Showing posts with label kubectl. Show all posts
Showing posts with label kubectl. Show all posts

Monday, May 23, 2022

error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"

Kubectl Error:

you may get this error when ever you are running kubectl command

error: exec plugin: invalid apiVersion "client.authentication.k8s.io/v1alpha1"

Solution: 

Make sure you update kubeconfig with below command:

aws eks update-kubeconfig --name ${EKS_CLUSTER_NAME} --region ${REGION}


Tuesday, May 26, 2020

Install kubectl on Ubuntu Instance | How to install kubectl in Ubuntu

Kubernetes uses a command line utility called kubectl for communicating with the cluster API server.
It is tool for controlling Kubernetes clusters. kubectl looks for a file named config in the $HOME/

How to install Kubectl in Ubuntu instance

Download keys from google website
curl -s https://packages.cloud.google.com/apt/doc/apt-key.gpg | sudo apt-key add -

Create the below file
sudo touch /etc/apt/sources.list.d/kubernetes.list

echo "deb http://apt.kubernetes.io/ kubernetes-xenial main" | sudo tee -a /etc/apt/sources.list.d/kubernetes.list

Update package manager
sudo apt-get update

Install
sudo apt-get install -y kubectl

Verify if kubectl got installed
kubectl version --short --client

How to install kubectl on Linux | Install kubectl on Amazon Linux / Red Hat Linux

Kubernetes uses a command line utility called kubectl for communicating with the cluster API server.

Download Amazon EKS-vended kubectl binary from Amazon S3
curl -o kubectl https://s3.us-west-2.amazonaws.com/amazon-eks/1.22.6/2022-03-09/bin/linux/amd64/kubectl

Apply execute permissions to the binary
chmod +x ./kubectl

Copy binary into a folder and add to path
mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin

Add the $HOME/bin path to your shell initialization file so that it is configured when you open a shell.
echo 'export PATH=$PATH:$HOME/bin' >> ~/.bashrc

Verify if kubectl got installed
kubectl version --short --client

Client Version: v1.22.6-eks-7d68063