Skip to content

Latest commit

 

History

History
52 lines (33 loc) · 1.61 KB

README.md

File metadata and controls

52 lines (33 loc) · 1.61 KB

tyk-cicd-demo

This is a playground for demostrating how to control deployment of APIs in CI/CD use Tyk Operator or Tyk Sync.

Example 1 - Deploying your application and API configurations using Helm and ArgoCD

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.

  1. 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.

Tyk Operator Environment Setup

For testing, spin up two local clusters:

minikube start -p staging
minikube start -p production

To switch cluster:

kubectx staging
kubectx production
  1. Install Tyk (Hybrid Gateways)

Follow gateway-configs to install Tyk.

  1. Install Tyk Operator

Follow operator-configs to install Tyk Operator and configure OperatorContext to connect to different Tyk environments.

  1. Install ArgoCD

Install ArgoCD on your cluster.

  1. Example HTTP API - See httpbin
  1. 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.