deploying nginx
Deploying nginx sample application
Nginx, pronounced engine x, is an HTTP and reverse proxy server.
Deploying nginx application
Deploying demo:
$ microk8s.kubectl create deployment nginx --image=nginxGet all pods:
$ microk8s.kubectl get pods
Accessing nginx pod
Run
$ microk8s.kubectl get podscopy the name of the pod and set the variable manually$ export POD_NAME=nginx-XXXXXEnabling proxy access to debug pods
$ microk8s.kubectl proxyGet information from the created pod (from another terminal)
$ curl http://localhost:8001/api/v1/namespaces/default/pods/$POD_NAME/proxy/
Get environment variables
$ microk8s.kubectl exec $POD_NAME -- envRun terminal of the pod
$ microk8s.kubectl exec -ti $POD_NAME bashType
exitto leave the section
Troubleshooting
Describe pod
$ microk8s.kubectl describe pod/$POD_NAME
Removing nginx deployment
Removing
$ microk8s.kubectl delete deployment.apps/nginx
Last updated
Was this helpful?