From 037eb2460eb7d82a6843b510cd12a36d54a4a16c Mon Sep 17 00:00:00 2001 From: Pierre-Yves Aillet Date: Wed, 5 Dec 2018 14:03:45 +0100 Subject: [PATCH] #11431 Remove load balance access task (#11518) --- ...load-balance-access-application-cluster.md | 125 ------------------ 1 file changed, 125 deletions(-) delete mode 100644 content/en/docs/tasks/access-application-cluster/load-balance-access-application-cluster.md diff --git a/content/en/docs/tasks/access-application-cluster/load-balance-access-application-cluster.md b/content/en/docs/tasks/access-application-cluster/load-balance-access-application-cluster.md deleted file mode 100644 index 29058660b8..0000000000 --- a/content/en/docs/tasks/access-application-cluster/load-balance-access-application-cluster.md +++ /dev/null @@ -1,125 +0,0 @@ ---- -title: Provide Load-Balanced Access to an Application in a Cluster -content_template: templates/tutorial -weight: 50 ---- - -{{% capture overview %}} - -This page shows how to create a Kubernetes Service object that provides -load-balanced access to an application running in a cluster. - -{{% /capture %}} - - -{{% capture prerequisites %}} - -{{< include "task-tutorial-prereqs.md" >}} {{< version-check >}} - -{{% /capture %}} - - -{{% capture objectives %}} - -* Run two instances of a Hello World application -* Create a Service object -* Use the Service object to access the running application - -{{% /capture %}} - - -{{% capture lessoncontent %}} - -## Creating a Service for an application running in two pods - -1. Run a Hello World application in your cluster: - - ``` - kubectl run hello-world --replicas=2 --labels="run=load-balancer-example" --image=gcr.io/google-samples/node-hello:1.0 --port=8080 - ``` - -1. List the pods that are running the Hello World application: - - ``` - kubectl get pods --selector="run=load-balancer-example" - ``` - - The output is similar to this: - - ``` - NAME READY STATUS RESTARTS AGE - hello-world-2189936611-8fyp0 1/1 Running 0 6m - hello-world-2189936611-9isq8 1/1 Running 0 6m - ``` - -1. Create a Service object that exposes the deployment: - - ``` - kubectl expose deployment --type=NodePort --name=example-service - ``` - - where `` is the name of your deployment. - -1. Display the IP addresses for your service: - - ``` - kubectl get services example-service - ``` - - The output shows the internal IP address and the external IP address of - your service. If the external IP address shows as ``, repeat the - command. - - {{< note >}} - If you are using Minikube, you don't get an external IP address. The - external IP address remains in the pending state. - {{< /note >}} - - NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE - example-service ClusterIP 10.0.0.160 8080/TCP 40s - -1. Use your Service object to access the Hello World application: - - curl :8080 - - where `` is the external IP address of your - service. - - The output is a hello message from the application: - - Hello Kubernetes! - - {{< note >}} - If you are using Minikube, enter these commands: - {{< /note >}} - - kubectl cluster-info - kubectl describe services example-service - - The output displays the IP address of your Minikube node and the NodePort - value for your service. Then enter this command to access the Hello World - application: - - curl : - - where `` us the IP address of your Minikube node, - and `` is the NodePort value for your service. - -## Using a service configuration file - -As an alternative to using `kubectl expose`, you can use a -[service configuration file](/docs/concepts/services-networking/service/) -to create a Service. - - -{{% /capture %}} - - -{{% capture whatsnext %}} - -Learn more about -[connecting applications with services](/docs/concepts/services-networking/connect-applications-service/). -{{% /capture %}} - - -