From b66e2d87bc18e0b9a7772a773e00c73c7bf66987 Mon Sep 17 00:00:00 2001 From: Jeff Bean Date: Wed, 18 Mar 2015 08:45:17 -0700 Subject: [PATCH] Adding seimple service to the demo setion --- .../coreos/bare_metal_offline.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/docs/getting-started-guides/coreos/bare_metal_offline.md b/docs/getting-started-guides/coreos/bare_metal_offline.md index af071d49b33..b997fca78ad 100644 --- a/docs/getting-started-guides/coreos/bare_metal_offline.md +++ b/docs/getting-started-guides/coreos/bare_metal_offline.md @@ -608,6 +608,23 @@ On the Kubernetes Master node lets create a '''nginx.yml''' image: dockerfile/nginx +Now for the service: ```nginx-service.yml``` + + kind: Service + apiVersion: v1beta1 + # must be a DNS compatible name + id: nginx-example + # the port that this service should serve on + port: 80 + # just like the selector in the replication controller, + # but this time it identifies the set of pods to load balance + # traffic to. + selector: + name: www + # the container on each pod to connect to, can be a name + # (e.g. 'www') or a number (e.g. 80) + containerPort: 80 + Now add the pod to Kubernetes: kubectl create -f nginx.yml