This is a playground for demostrating how to control deployment of APIs in CI/CD use Tyk Operator or Tyk Sync.
In this example, you'll use Helm to package your applications with API configurations. The Helm Chart and manifests are committed to Git. ArgoCD will automatically re-deploy (sync) your Helm Chart.
- Environment setup
First, setup your Tyk environments for testing. In this demo, we assume 3 environments (dev, staging, prod).
Then, setup some local Kubernetes clusters where you can deploy ArgoCD, Tyk Operator, and the applications.
For testing, spin up two local clusters:
minikube start -p staging
minikube start -p production
To switch cluster:
kubectx staging
kubectx production
- Install Tyk (Hybrid Gateways)
Follow gateway-configs
to install Tyk.
- Install Tyk Operator
Follow operator-configs
to install Tyk Operator and configure OperatorContext to connect to different Tyk environments.
- Install ArgoCD
Install ArgoCD on your cluster.
- Example HTTP API - See httpbin
- To enable GitOps management of your application and APIs, create some ArgoCD Applications, e.g.:
kubectl apply -f argocd/httpbin-applicationset.yaml
This will automatically deploy applications to multiple environments during ArgoCD synchronization.