This repository contains samples for the workshop Service Management.
You find the demos in the corresponding branches
- Demo Backstage
- Demo Observability
- Demo Service Mesh
- Demo Versioning V1.0
- Demo Versioning V1.1
- Demo Versioning V2.0
Create a Kubernetes Cluster on your machine:
If you want to use a Kubernetes in Docker Cluster, you can use KinD.
To do so create a cluster by executing the following command:
kind create cluster --config=./deployment/cluster-setup/kind-config.yml --name=workshop-service-mngmt-cluster
Check that context is set to kind-workshop-service-mgmt-cluster:
kubectl config current-context
If the context was not set automatically, but the cluster is running in the docker environment set the context manually:
kubectl config set-context kind-workshop-service-mgmt-cluster
To deploy the applications to the cluster, we use Skaffold.
Skaffold will build the required images and deploy them to the cluster via kustomize. If the cluster created, Skaffold and kubectl are installed, we are ready to go.
To deploy the applications to the cluster, execute the following command in the root directory of this repository:
skaffold run
We observed that sometimes it can happen, that the ingress-operator is not installed quick enough. If that happens just rerun the skaffold run command after it failed the first time.
To access the Applications we can either use the ingresses that are deployed to the cluster or access them via the exposed NodePort Services. Port-Forwarding is also an option, but not necessary.
To access them via a Domain Name add those entries to the /etc/hosts file. (You will need admin rights to do so)
127.0.0.1 address-validation.localhost
127.0.0.1 billing.localhost
127.0.0.1 customer.localhost
127.0.0.1 delivery.localhost
If you don't have admin rights or do not want to change the /etc/hosts file, the applications can be accessed via the exposed NodePorts with the following assigned ports:
For Address Validation: http://localhost:30080
For Billing: http://localhost:30081
For Customer: http://localhost:30082
For Delivery: http://localhost:30083
If for whatever reason both options above are not working, you can also use port-forwarding to access the applications.
To check what is running on the cluster, you can use kubectl to navigate through the cluster. k9s.io is also a nice tool to do so.
To clean up the cluster from everything that skaffold has installed, execute the following command:
skaffold delete
To also delete the KinD cluster and the docker container that it is running in, execute the following commands:
docker container stop workshop-service-mngmt-cluster-control-plane
kind delete cluster -n workshop-service-mngmt-cluster