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:
-
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
-
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)'
-
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
-
Send traffic to the
Guestbook
microservice application.curl -s -H "Host: www.guestbook.com" http://<MiniKube IP:<NodePort> | grep Guestbook
-
(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.