From ed320c64fa40c81c6f20e4c5329e0fcc75ac5b6c Mon Sep 17 00:00:00 2001 From: Davanum Srinivas Date: Wed, 20 Apr 2016 10:26:23 -0400 Subject: [PATCH] Show how to access the deployed service add a simple "expose deployment" to show the user how to access the nginx containers --- docs/getting-started-guides/locally.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/docs/getting-started-guides/locally.md b/docs/getting-started-guides/locally.md index cc2f9f1107..0110741307 100644 --- a/docs/getting-started-guides/locally.md +++ b/docs/getting-started-guides/locally.md @@ -62,10 +62,16 @@ cluster/kubectl.sh run my-nginx --image=nginx --replicas=2 --port=80 exit ## 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! cluster/kubectl.sh get pods cluster/kubectl.sh get services 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