Show how to access the deployed service
add a simple "expose deployment" to show the user how to access the nginx containerspull/412/head
parent
c3b8cccb9f
commit
ed320c64fa
|
@ -62,10 +62,16 @@ cluster/kubectl.sh run my-nginx --image=nginx --replicas=2 --port=80
|
||||||
exit
|
exit
|
||||||
## end wait
|
## end wait
|
||||||
|
|
||||||
|
## create a service for nginx, which serves on port 80
|
||||||
|
cluster/kubectl.sh expose deployment my-nginx --port=80 --name=my-nginx
|
||||||
|
|
||||||
## introspect Kubernetes!
|
## introspect Kubernetes!
|
||||||
cluster/kubectl.sh get pods
|
cluster/kubectl.sh get pods
|
||||||
cluster/kubectl.sh get services
|
cluster/kubectl.sh get services
|
||||||
cluster/kubectl.sh get deployments
|
cluster/kubectl.sh get deployments
|
||||||
|
|
||||||
|
## Test the nginx service with the IP/port from "get services" command
|
||||||
|
curl http://10.X.X.X:80/
|
||||||
```
|
```
|
||||||
|
|
||||||
### Running a user defined pod
|
### Running a user defined pod
|
||||||
|
|
Loading…
Reference in New Issue