DEV Community

Ahmet Akan
Ahmet Akan

Posted on

Setting Up Kubernetes Command Line Tool (kubectl)

Summary

The Kubernetes command-line tool, kubectl, allows you to run commands against Kubernetes clusters. You can use kubectl to deploy applications, inspect and manage cluster resources, and view logs.

This tutorial will guide you through the installation and configuration of this tool on Linux.

Installation Steps:

Download the Amazon EKS vended kubectl from AWS. To download the Arm version, change amd64 to arm64 before running the command.

$ curl -o kubectl https://amazon-eks.s3.us-west-2.amazonaws.com/1.21.2/2021-07-05/bin/linux/amd64/kubectl
Enter fullscreen mode Exit fullscreen mode

Add execute permission to the binary.

$ chmod +x ./kubectl
Enter fullscreen mode Exit fullscreen mode

Add the binary to the search path.

$ mkdir -p $HOME/bin && cp ./kubectl $HOME/bin/kubectl && export PATH=$PATH:$HOME/bin
Enter fullscreen mode Exit fullscreen mode

Verify the version with the following command:

$ kubectl version --short --client
Client Version: v1.21.2-13+d2965f0db10712
Enter fullscreen mode Exit fullscreen mode

Top comments (0)