Skip to content

Latest commit

 

History

History
59 lines (25 loc) · 2.55 KB

cpx-in-minikube.md

File metadata and controls

59 lines (25 loc) · 2.55 KB

Load balance Ingress traffic with Citrix ADC CPX in Minikube

In this example, the Citrix ADC CPX (a containerized form-factor) is used to route the Ingress traffic to a Guestbook microservice application deployed in a Minikube cluster. An Ingress resource is deployed in the MiniKube cluster to define the rules for sending external traffic to the application.

Prerequisite:

Ensure that you have installed and set up a Minikube cluster (This example is tested on Minikube v1.23 having K8s 1.22.1 deployed).

Perform the following:

  1. Deploy Citrix ADC CPX as an Ingress proxy in the Minikube cluster and verify the installation using the following commands.

    kubectl create -f https://raw.githubusercontent.com/citrix/cloud-native-getting-started/master/beginners-guide/manifest/cpx.yaml
     
    kubectl get pods -l app=cpx-ingress
    
  2. Deploy the Guestbook application in Minikube and verify the installation.

     kubectl create -f https://raw.githubusercontent.com/citrix/cloud-native-getting-started/master/beginners-guide/manifest/guestbook-app.yaml
    
     kubectl get pods -l 'app in (guestbook, redis)'
    
  3. Deploy an Ingress rule that sends traffic to http://www.guestbook.com.

     kubectl create -f https://raw.githubusercontent.com/citrix/cloud-native-getting-started/master/beginners-guide/manifest/guestbook-ingress.yaml
    
     kubectl get ingress
    
     kubectl get svc cpx-service
    
  4. Send traffic to the Guestbook microservice application.

     curl -s -H "Host: www.guestbook.com" http://<MiniKube IP:<NodePort> | grep Guestbook
    

    guestbook-minikube-output

  5. (Optional) Clean up the deployments using the following commands.

     kubectl delete -f https://raw.githubusercontent.com/citrix/cloud-native-getting-started/master/beginners-guide/manifest/cpx.yaml
    
     kubectl delete -f https://raw.githubusercontent.com/citrix/cloud-native-getting-started/master/beginners-guide/manifest/guestbook-app.yaml
    
     kubectl delete -f https://raw.githubusercontent.com/citrix/cloud-native-getting-started/master/beginners-guide/manifest/guestbook-ingress.yaml
    

For more information on the Citrix ingress controller, see the Citrix ingress controller documentation.

For more tutorials, see beginners-guides.