Skip to end of metadata
Go to start of metadata
Tutorial
- begin by installing minikube - download the windows installer, tried using choco but didn't work (mmmmm)
- run the command - minikube start - this will configure docker to work with minikube, caveat: wanted VBox and wouldn't work with HyperV
- 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
- run the command choco install kubernetes-cli
- run the command refreshenv to enable kubectl without having to shutdown and reopen the shell
Running an application
- kubectl version
- kubectl get version
- kubectl run kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1 --port=8080
- kubectl get deployments
Viewing the app
- In another terminal run the proxy with the command - kubectl proxy
- this will lock the terminal from which the command is run
- Go back to another terminal
- curl http://localhost:8001/version
On Linux/UNIX
- export POD_NAME=$(kubectl get pods -o go-template --template '{{range .item}}{{.metadata.name}}{{"\n"}}{{end}}')
- echo $POD_NAME
- curl http://localhost:8001/api/v1/namespaces/default/pods/$POD_NAME/proxy/
On Windows
- $Env:POD_NAME=$(kubectl get pods -o go-template --template '{{range .item}}{{.metadata.name}}{{end}}')
- echo $Env:POD_NAME
- curl http://localhost:8001/api/v1/namespaces/default/pods/$Env:POD_NAME/proxy/