anchor.diff:  [.thumb]
   image::k8s-services.png[]
   
  -== Deploy application
  +=== Deploy Application
   
   . Deploy the application:
   
  -    kubectl create -f templates/app.yml
  +  $ kubectl create -f templates/app.yml
   
   . Get the list of services:
   
  -  kubectl get svc
  +  $ kubectl get svc
     NAME              CLUSTER-IP       EXTERNAL-IP        PORT(S)        AGE
     greeter-service   100.64.44.23     <none>             8080/TCP       13s
     kubernetes        100.64.0.1       <none>             443/TCP        23m
  
positive.code: 
  Wait for ~3 mins for the load balancer to accept request.
  
  == Access application
  
  Access the application using the following URLs with `curl` or in browser:
  
    http://<host>
    http://<host>?greet=ho
    http://<host>?id=1
    http://<host>?greet=ho&id=1
  
  `<host>` is the value of the ingress load balancer's address.
  
  == Delete application
  
  Delete the application as shown:
  
    kubectl delete -f templates/app.yml
  
  
negative.code: = Service Discovery for Microservices with Kubernetes
  :icons:
  :linkcss:
  :imagesdir: ../images
  :toc:
  
  This chapter shows an example of how different microservices within an application can use service discovery to locate each other in the infrastructure rather than via hardcoded IP addresses.
  
  === Prerequisites
  
  A 3 master nodes and 5 worker nodes cluster as explained in the link:../cluster-install#multi-master-multi-node-multi-az-gossip-based-cluster[cluster-install] chapter.
  
  All configuration files for this chapter are in the `microservices` directory.
  
  === Application Architecture
  
  The sample application uses three services:
  
  