This repository contains the Citrix ADC CPX which is a container-based application delivery controller that can be provisioned on a Docker host. Learn more about Citrix ADC CPX here.
There are two deployment solution present for Citrix ADC CPX in Google cloud.
- Stanalone CPX.
- Citrix ADC CPX with Citrix Ingress Controller running in side-car mode.
You can use Google Cloud Shell or a local workstation to complete these steps.
You'll need the following tools in your development environment. If you are using Cloud Shell, gcloud, kubectl, Docker, and Git are installed in your environment by default.
Configure gcloud
as a Docker credential helper:
gcloud auth configure-docker
Create a cluster from the command line. If you already have a cluster that you want to use, skip this step.
export CLUSTER=citrix-cpx
export ZONE=asia-south1-a
gcloud container clusters create "$CLUSTER" --zone "$ZONE"
gcloud container clusters get-credentials "$CLUSTER" --zone "$ZONE"
Clone this repo and the associated tools repo:
git clone --recursive https://github.com/GoogleCloudPlatform/click-to-deploy.git
An Application resource is a collection of individual Kubernetes components, such as Services, Deployments, and so on, that you can manage as a group.
To set up your cluster to understand Application resources, run the following command:
kubectl apply -f "https://raw.githubusercontent.com/GoogleCloudPlatform/marketplace-k8s-app-tools/master/crd/app-crd.yaml"
You need to run this command once for each cluster.
The Application resource is defined by the Kubernetes SIG-apps community. The source code can be found on github.com/kubernetes-sigs/application.
Go to click-to-deploy/k8s folder and clone this repo. Go to citrix-adc-cpx-gcp-marketplace directory:
cd click-to-deploy/k8s
git clone https://github.com/citrix/citrix-adc-cpx-gcp-marketplace.git
cd citrix-adc-cpx-gcp-marketplace/
The following table lists the configurable parameters of the CPX with Citrix ingress controller running as side-car chart and their default values.
Parameter | Description | Default |
---|---|---|
license.accept |
Set to accept to accept the terms of the Citrix license | no |
cpx.image |
CPX Image Repository | quay.io/citrix/citrix-k8s-cpx-ingress:12.1-51.16 |
cpx.pullPolicy |
CPX Image Pull Policy | Always |
cic.required |
Exporter to be run as sidecar with CIC | false |
cic.image |
CIC Image Repository | quay.io/citrix/citrix-k8s-ingress-controller:1.1.1 |
cic.pullPolicy |
CIC Image Pull Policy | Always |
exporter.required |
Exporter to be run as sidecar with CIC | false |
exporter.image |
Exporter image repository | quay.io/citrix/netscaler-metrics-exporter:v1.0.4 |
exporter.pullPolicy |
Exporter Image Pull Policy | Always |
exporter.ports.containerPort |
Exporter Container Port | 8888 |
ingressClass |
List containing name of the Ingress Classes | nil |
logLevel |
Optional: This is used for controlling the logs generated from Citrix Ingress Controller. options available are CRITICAL ERROR WARNING INFO DEBUG | DEBUG |
Assign values to the required parameters:
CITRIX_NAME=citrix-1
CITRIX_NAMESPACE=default
CITRIX_SERVICEACCOUNT=cic-k8s-role
Create a service account with required permissions:
cat service_account.yaml | sed -e "s/{NAMESPACE}/$CITRIX_NAMESPACE/g" -e "s/{SERVICEACCOUNTNAME}/$CITRIX_SERVICEACCOUNT/g" | kubectl create -f -
NOTE: The above are the mandatory parameters. In addition to these you can also assign values to the parameters mentioned in the above table.
Create a template for the chart using the parameters you want to set:
helm template chart/citrix-adc-cpx \
--name $CITRIX_NAME \
--namespace $CITRIX_NAMESPACE \
--set license.accept=yes \
--set serviceAccount=$CITRIX_SERVICEACCOUNT > /tmp/$CITRIX_NAME.yaml
Finally, deploy the chart:
kubectl create -f /tmp/$CITRIX_NAME.yaml
Delete the application, service account and cluster:
kubectl delete -f /tmp/$CITRIX_NAME.yaml
cat service_account.yaml | sed -e "s/{NAMESPACE}/$CITRIX_NAMESPACE/g" -e "s/{SERVICEACCOUNTNAME}/$CITRIX_SERVICEACCOUNT/g" | kubectl delete -f -
gcloud container clusters delete "$CLUSTER" --zone "$ZONE"
This project adheres to the Kubernetes Community Code of Conduct. By participating in this project you agree to abide by its terms.