How to install kubectl on Mac?

0657

To install kubectl on a Mac, you can use one of the following methods:

Method 1: Using Homebrew

  1. Open Terminal.

  2. Install kubectl using Homebrew with the following command:

    brew install kubectl
  3. Verify the installation:

    kubectl version --client

Method 2: Using curl

  1. Open Terminal.

  2. Download the latest release of kubectl:

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

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

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

    kubectl version --client

Choose the method that you prefer, and you'll have kubectl installed on your Mac.

0 Comments

no data
Be the first to share your comment!