...
- kubectl version
- kubectl get version
- kubectl run kubernetes-bootcamp --image=gcr.io/google-samples/kubernetes-bootcamp:v1 --port=8080
- kubectl get deployments
The above steps is similar to what happens with docker run but pointing to an image that is in the remote repo (download the image and then run a container)
Use kubectl get pods
to see the new pod. Copy the pod name.
Use the command kubectl get -o json pob <pod name>
to see the pod details.
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
...
Code Block | ||||
---|---|---|---|---|
| ||||
kubectl expose deployment hello-node --type=LoadBalancer --port=8080 |
Run the command minikube service list
to get a list of available services. When you do this the hello-world service should have a valid URL you can enter into your browser.