This repository contains samples for the workshop Consumer-Driven Contract Testing.
We use KinD to create a local Kubernetes Cluster.
First install KinD.
Create a cluster by executing the following command:
kind create cluster --config=./deployment/cluster-config/kind-config.yml --name=workshop-cdc-cluster
Store the internal kube config of the cluster in jenkins to enable deployment from jenkins by executing the following command:
kind -n workshop-cdc-cluster get kubeconfig --internal > jenkins/kube-config
docker compose build
kind load docker-image host.docker.internal:5000/gogs:local -n workshop-cdc-cluster
kind load docker-image host.docker.internal:5000/jenkins:local -n workshop-cdc-cluster
kind load docker-image host.docker.internal:5000/setup:local -n workshop-cdc-cluster
kind load docker-image host.docker.internal:5000/delivery-db:local -n workshop-cdc-cluster
kubectl apply -k ./deployment/
Once the cluster and the services are established (this will take a while), you can access the services with the following urls:
To remove the cluster, execute the following command:
kind delete cluster -n workshop-cdc-cluster