NetScaler® ingress controller

Deploy NetScaler CPX as an Ingress device in an Amazon EKS cluster

This topic explains how to deploy NetScaler CPX as an ingress device in an Amazon EKS cluster. NetScaler CPX supports the Amazon virtual private cloud (VPC) CNI plug-in provided for Kubernetes. This CNI plug-in allows Kubernetes pods to have the same IP address inside the pod as they do on the VPC network. When you deploy NetScaler CPX as a pod in Amazon EKS, an IP address is allocated to the NetScaler CPX from the same VPC network.

How to deploy NetScaler CPX as an Ingress device in an Amazon EKS cluster

Perform the following steps to deploy NetScaler CPX as an Ingress device in an Amazon EKS cluster.

Note:

In this procedure, Apache web server is used as the sample application.

  1. Deploy the required application in your Kubernetes cluster and expose it as a service in your cluster using the following command.

    kubectl create -f apache.yaml
    

    Note:

    In this example, apache.yaml is used. You must use the specific YAML file for your application.

  2. Deploy NetScaler CPX as an Ingress device in the cluster using the standalone_cpx.yaml file.

    kubectl create -f standalone_cpx.yaml
    
  3. Create the Ingress resource using the cpx_ingress.yaml following command.

    kubectl create -f cpx_ingress.yaml
    
  4. Create a service of type LoadBalancer for accessing the NetScaler CPX by using the cpx_service.yaml file.

    kubectl create -f cpx_service.yaml
    

    This command creates an Elastic Load Balancer (ELB) with an external IP for receiving traffic.

  5. Verify the service and check whether the load balancer has created an external IP. Wait for some time if the external IP is not created.

    kubectl  get svc
    
    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
    apache ClusterIP 10.0.103.3 none 80/TCP 2 m
    cpx-ingress LoadBalancer 10.0.37.255 pending 80:32258/TCP,443:32084/TCP 2 m
    Kubernetes ClusterIP 10.0.0.1 none 443/TCP 22 h
  6. Once the external IP for the load-balancer is available as follows, you can access your resources using the external IP for the load balancer.

    kubectl  get svc
    
    NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
    apache ClusterIP 10.0.103.3 none 80/TCP 3 m
    cpx-ingress LoadBalancer 10.0.37.255 <External-ip-of-loadbalancer> 80:32258/TCP,443:32084/TCP 2 m
    Kubernetes ClusterIP 10.0.0.1 none 443/TCP 22 h

    Note:

    The health check for the cloud load-balancer is obtained from the readinessProbe configured in the NetScaler CPX deployment YAML file. If the health check fails, you must check the readinessProbe configured for NetScaler CPX. For more information, see readinessProbe and external Load balancer.

  7. Access the application using the following command.

    curl http://<External-ip-of-loadbalancer>/ -H 'Host: citrix-ingress.com'
    

Quick Deploy

For the ease of deployment, you can just deploy a single all-in-one manifest that would combine the steps explained in the previous topic.

  1. Deploy a NetScaler CPX ingress with in built NetScaler Ingress Controller in your Kubernetes cluster using the all-in-one.yaml.

    kubectl create -f https://raw.githubusercontent.com/citrix/citrix-k8s-ingress-controller/master/deployment/aws/manifest/all-in-one.yaml
    
  2. Access the application using the following command.

    curl http://<External-ip-of-loadbalancer>/ -H 'Host: citrix-ingress.com'
    

    Note:

    To delete the deployment, use the kubectl delete -f all-in-one.yaml command.

Deploy NetScaler CPX as an Ingress device in an Amazon EKS cluster