The demo sources used as part of Red Hat DevNationLive Webinar Plumbing Kubernetes builds | deploy with Tekton.
- A Kubernetes cluster or OpenShift with Tekton installed
- If minikube have the internal container registry deployed; check Registry Helpers
- Download and add Tekton CLI to the path
[IMPORTANT]
If you are tying to use local container registry for image build and push then its recommended to use minikube version v1.1.1 because of an existing container registry issue kubernetes/minikube#4604
The application uses a simple Java HelloWorld application built using Quarkus, https://github.com/kameshsampath/pipeline-helloworld
git clone https://https://github.com/kameshsampath/pipeline-helloworld && \
cd pipeline-helloworld
- Create Service Account called
pipeline
and make it as cluster-admin
Kubernetes
kubectl create sa pipeline && \
kubectl create clusterrolebinding pipeline-cluster-admin-binding --clusterrole=cluster-admin --serviceaccount=default:pipeline
OpenShift
oc new-project tutorial && \
oc create serviceaccount pipeline && \
oc adm policy add-scc-to-user privileged -z pipeline && \
oc adm policy add-role-to-user edit -z pipeline
-
Create Pipeline Resources
kubectl create -f build-resources.yaml
-
Create Pipeline Task
kubectl create -f app-build-task.yaml
-
Run the Pipeline Task
kubectl create -f app-build-task-run.yaml
-
Create the Pipeline
kubectl create -f app-deploy.yaml
-
Run the Pipeline
tkn pipeline start --resource="app-source=git-source" --resource="app-image=helloworld-image" --serviceaccount='pipeline' app-deploy