- k8s cluster to install the tekton pipelines instance (tested with 3 cluster nodes with 2 vCPUs and 4 GB memory).
- Nginx ingress installed (if not is installed follow this procedure to install it).
- Cert-manager installed (if not is installed follow this procedure to install it).
- kubectl cli installed to comunicate with k8s cluster.
- Helm cli installed to deploy required resources.
- Replace and set a valid email in the
<YOUR_EMAIL>
section in the ClusterIssuer.yaml file using the following command.
sed -i -e "s, <EMAIL>, <YOUR_EMAIL>,g" apps/ClusterIssuer.yaml
- Run the following commands to install the ClusterIssuer resource.
kubectl apply -f apps/ClusterIssuer.yaml
- Run the following command to get the nginx ingress public IP.
kubectl get svc ingress-nginx-controller -o jsonpath='{.status.loadBalancer.ingress[0].ip}' -n ingress-nginx; echo
- Put your nginx ingress public IP on
<NGINX_INGRESS_IP>
and run the following commands to replace the nginx ingress public IP in the required resources.
sed -i -e "s/W.X.Y.Z/<NGINX_INGRESS_IP>/g" apps/tekton/release.yaml apps/tekton/tekton-dashboard-ingress.yaml apps/grafana/grafana.yaml DemoPipelines/build-push-deploy-run.yaml
- Run the following commands to install the latest tekton pipelines resources.
kubectl apply -f apps/tekton/release.yaml
kubectl apply -f https://storage.googleapis.com/tekton-releases/triggers/previous/v0.25.0/release.yaml
kubectl apply -f https://storage.googleapis.com/tekton-releases/triggers/previous/v0.25.0/interceptors.yaml
kubectl apply -f https://storage.googleapis.com/tekton-releases/dashboard/previous/v0.40.1/release-full.yaml
kubectl apply -f apps/tekton/tekton-dashboard-ingress.yaml
- Run the following command to check the pod status.
kubectl get pods -n tekton-pipelines
Sample output:
NAME READY STATUS RESTARTS AGE
tekton-dashboard-64bf8f9dfd-tgv44 1/1 Running 0 5d21h
tekton-events-controller-5fdf9cdd89-s4857 1/1 Running 0 5d21h
tekton-pipelines-controller-6d84b6bc96-mmpd9 1/1 Running 0 5d21h
tekton-pipelines-webhook-764d64c8bd-kfmlr 1/1 Running 0 5d21h
tekton-triggers-controller-6974c7d74b-vkqvz 1/1 Running 0 5d21h
tekton-triggers-core-interceptors-7cbd98668b-vgjd4 1/1 Running 0 5d21h
tekton-triggers-webhook-789d5f5bd4-xsnm7 1/1 Running 0 5d21h
- Run the following command to install prometheus-server, node-exporter and kube-state-metrics.
kubectl apply -f apps/prometheus/prometheus.yaml
- Run the following command to install grafana.
kubectl apply -f apps/grafana/grafana.yaml
- Run the following command to create a demo namespace.
kubectl create namespace demopipelines
- (Optional) If you want to run a simple CI/CD demo pipeline you have to create a private docker registry to push and pull docker images and the create the kubernetes secret using the following command:
kubectl create secret docker-registry <secret-name> --docker-server=<your-registry-server> --docker-username=<your-name> --docker-password=<your-pword> --docker-email=<your-email>
Then run the following command to replace the secret name on the service account:
sed -i -e "s/SECRET_NAME/<your-secret-name>/g" DemoPipelines/resources/sa.yaml
- Run the following commands to install demo pipelines with all the tasks associated.
kubectl apply -f DemoPipelines/resources/
kubectl apply -f DemoPipelines/tasks/
kubectl apply -f DemoPipelines/pipeline/
- To run the tekton demo pipelines run the following commands:
kubectl create -f DemoPipelines/pipelinerun.yaml
kubectl create -f DemoPipelines/build-push-deploy-run.yaml
- Use the tekton dashboard to check the pipeline result.
- Use the following URLs to access tekton dashboard and grafana:
https://tekton.<NGINX_INGRESS_IP>.nip.io
https://grafana.<NGINX_INGRESS_IP>.nip.io
user: admin
pass: admin