How to install kubectl?

0505

To install kubectl, follow these steps based on your operating system:

For Linux:

  1. Download the latest release:

    curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl"
    
  2. Make the binary executable:

    chmod +x ./kubectl
    
  3. Move the binary to your PATH:

    sudo mv ./kubectl /usr/local/bin/kubectl
    
  4. Verify the installation:

    kubectl version --client
    

For macOS:

  1. Install using Homebrew:

    brew install kubectl
    
  2. Verify the installation:

    kubectl version --client
    

For Windows:

  1. Download the latest release: Go to the Kubernetes release page and download the kubectl.exe.

  2. Add the executable to your PATH.

  3. Verify the installation: Open Command Prompt and run:

    kubectl version --client
    

Further Learning:

For more detailed instructions and options, refer to the official Kubernetes documentation.

0 Comments

no data
Be the first to share your comment!