Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Version History

« Previous Version 5 Next »

Tutorial

  1. begin by installing minikube - download the windows installer, tried using choco but didn't work (mmmmm)
  2. run the command - minikube start - this will configure docker to work with minikube, caveat: wanted VBox and wouldn't work with HyperV
    1. read the messages carefully, on Windows you must still install kubectl manually even though the minikube start command says it downloaded and configure kubectl to work with Docker
  3. run the command choco install kubernetes-cli
  4. run the command refreshenv to enable kubectl without having to shutdown and reopen the shell

Once minikube is running, it has a really cool dashboard that can be used to administer it.  The dashboard can be triggered by using the following command minikube dashboard, this will lock the terminal.  When it runs, it will automatically open the dashboard using your default browser.

Most of the commands that you can execute from the shell can be done from the dashboard

Running an application

  1. kubectl version
  2. kubectl get version
  3. kubectl run kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1 --port=8080
  4. kubectl get deployments

Viewing the app

  1. In another terminal run the proxy with the command - kubectl proxy
    1. this will lock the terminal from which the command is run
  2. Go back to another terminal 
  3. curl http://localhost:8001/version

On Linux/UNIX

  1. export POD_NAME=$(kubectl get pods -o go-template --template '{{range .item}}{{.metadata.name}}{{"\n"}}{{end}}')
  2. echo $POD_NAME
  3. curl http://localhost:8001/api/v1/namespaces/default/pods/$POD_NAME/proxy/

On Windows

  1. $Env:POD_NAME=$(kubectl get pods -o go-template --template '{{range .item}}{{.metadata.name}}{{end}}')
  2. echo $Env:POD_NAME
  3. curl http://localhost:8001/api/v1/namespaces/default/pods/$Env:POD_NAME/proxy/



  • No labels