Warning: this is a demo project - not production ready.
Follow along to deploy 2 environments with ArgoCD and Tyk Self-Managed. You will need a license for Tyk Self-Managed. You can register for a free trial: https://tyk.io/sign-up/#self.
This demo is based on the blog post:
In this demo, we will assume 2 environments (staging and prod) running in minikube:
minikube start -p staging
minikube start -p production
Later, to list the clusters:
minikube profile list
Then to switch cluster use kubectx:
kubectx staging
kubectx production
kubectx staging
Here are the commands needed to Install ArgoCD on your cluster. Refer to ArgoCD documentation for more details.
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
Forward the local port 9080 to ArgoCD's secure port (443) to access ArgoCD UI interface:
kubectl port-forward svc/argocd-server -n argocd 9080:443
Download and install Argo CD CLI and retrieve default admin password:
argocd admin initial-password -n argocd
- Argo admin UI: https://localhost:9080/applications (user: admin)
- Clone this repository locally
- Replace
YOUR-LICENSE-GOES-HERE
with your Tyk self-managed license in ./staging/argo-applications-tyk/tyk-stack.yml. You can register for a free trial: https://tyk.io/sign-up/#self. - Start by deploying the dependencies (configuration, Redis, PostgreSQL):
cd ./staging/argo-applications-tyk
kubectl apply -f tyk-config-secrets.yml
kubectl apply -f tyk-redis.yml
kubectl apply -f tyk-postgres.yml
Wait for all the applications to be Healthy and Synched, then deploy Tyk Self-Managed:
kubectl apply -f tyk-stack.yml
Port forward Tyk Gateway:
kubectl port-forward svc/gateway-svc-tyk-stack-tyk-gateway 8080:8080 -n tyk
Check that it is healthy by sending a request to the health endpoint: http://localhost:8080/hello.
Port forward Tyk Dashboard:
kubectl port-forward svc/dashboard-svc-tyk-stack-tyk-dashboard 3000:3000 -n tyk
Log into Tyk Dashboard: http://localhost:3000 (default@example.com / 123456 if you haven't changed the default from the Helm chart).
Configure an Argo CD application to deploy Tyk Operator and Cert Manager. Tyk Operator enables the management of Tyk API Gateway within Kubernetes, and Cert Manager handles SSL/TLS for secure communication.
kubectl apply -f application-cert-manager.yaml
kubectl apply -f application-tyk-operator.yaml
API Definitions are going to be stored into the direction ./api-definitions. Let's create an Argo app to synced the API Definitions automatically from GitHub:
kubectl apply -f application-api-definitions.yaml
kubectx production
Here are the commands needed to Install ArgoCD on your cluster. Refer to ArgoCD documentation for more details.
kubectl create namespace argocd
kubectl apply -n argocd -f https://raw.githubusercontent.com/argoproj/argo-cd/stable/manifests/install.yaml
Forward the local port 9080 to ArgoCD's secure port (443) to access ArgoCD UI interface:
kubectl port-forward svc/argocd-server -n argocd 9080:443
Download and install Argo CD CLI and retrieve default admin password:
argocd admin initial-password -n argocd
- Argo admin UI: https://localhost:9080/applications (user: admin)
- Clone this repository locally
- Replace
YOUR-LICENSE-GOES-HERE
with your Tyk self-managed license in ./staging/argo-applications-tyk/tyk-stack.yml. You can register for a free trial: https://tyk.io/sign-up/#self. - Start by deploying the dependencies (configuration, Redis, PostgreSQL):
cd ./production/argo-applications-tyk
kubectl apply -f tyk-config-secrets.yml
kubectl apply -f tyk-redis.yml
kubectl apply -f tyk-postgres.yml
Wait for all the applications to be Healthy and Synched, then deploy Tyk Self-Managed:
kubectl apply -f tyk-stack.yml
Port forward Tyk Gateway:
kubectl port-forward svc/gateway-svc-tyk-stack-tyk-gateway 8080:8080 -n tyk
Check that it is healthy by sending a request to the health endpoint: http://localhost:8080/hello.
Port forward Tyk Dashboard:
kubectl port-forward svc/dashboard-svc-tyk-stack-tyk-dashboard 3000:3000 -n tyk
Log into Tyk Dashboard: http://localhost:3000 (default@example.com / 123456 if you haven't changed the default from the Helm chart).
- Contribution guidelines
- PR template
- Bug report template
- Feature request template
- Contributor License Agreement - This will enforce your contributors to sign the CLA on the first time they submit a PR.
- License from tyk-gateway
- Default Repo README, which resides in
/.github