Skip to content

Instantly share code, notes, and snippets.

@JinhaiZ
Last active December 5, 2017 09:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save JinhaiZ/385cba0a51cb20dfddf2946839bd0d61 to your computer and use it in GitHub Desktop.
Save JinhaiZ/385cba0a51cb20dfddf2946839bd0d61 to your computer and use it in GitHub Desktop.
Installation and configuration for local kubernetes environment

Download Kubectl

  1. Download the lastest 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 it executable

    chmod +x ./kubectl

  3. Move it to /usr/local/bin

    sudo mv ./kubectl /usr/local/bin/kubectl

or combine the above commands together

`curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x ./kubectl && sudo mv ./kubectl /usr/local/bin/kubectl`
  1. enable kubectl auto completion, add the following to your ~/.zshrc file

    if [ $commands[kubectl] ]; then
      source <(kubectl completion zsh)
    fi

Download Minikube

  1. Download the lastest release

    curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64

  2. Make it executable

    chmod +x minikube

  3. Move it to /usr/local/bin

    sudo mv minikube /usr/local/bin/

or combien the above command together

`curl -Lo minikube https://storage.googleapis.com/minikube/releases/latest/minikube-linux-amd64 && chmod +x minikube && sudo mv minikube /usr/local/bin/`

Test cluster commands

  1. check status

    minikube status

  2. if not started, then

    minikube start

    you can see the following output

    minikube: Running
    cluster: Running
    kubectl: Correctly Configured: pointing to minikube-vm at 192.168.99.100
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment