This example application deploys hello-kubernetes using cdk8s.
You can apply this example into your own k8s cluster with these step by step commands:
$ pipenv install
$ cdk8s import --language python
$ cdk8s synth
$ kubectl apply -f dist/hello.k8s.yaml
After apply step, hello-svc can be reached at localhost:8080:
$ make status
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE SELECTOR
service/kubernetes ClusterIP 10.43.0.1 <none> 443/TCP 2m40s <none>
service/hello-service-c8685ad9 LoadBalancer 10.43.174.4 192.168.240.2,192.168.240.3 80:32694/TCP 2m8s app=hello
NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES
pod/svclb-hello-service-c8685ad9-mvrxw 1/1 Running 0 2m8s 10.42.1.4 k3d-k3s-default-agent-0 <none> <none>
pod/svclb-hello-service-c8685ad9-kg2pk 1/1 Running 0 2m8s 10.42.0.5 k3d-k3s-default-server-0 <none> <none>
pod/hello-deployment-c8aab50d-586bd8cf75-rs827 1/1 Running 0 2m8s 10.42.0.3 k3d-k3s-default-server-0 <none> <none>
pod/hello-deployment-c8aab50d-586bd8cf75-6d967 1/1 Running 0 2m8s 10.42.0.4 k3d-k3s-default-server-0 <none> <none>
For more details see: gh-ction demo, Source gh-action, K3d config
https://github.com/cdk8s-team/cdk8s/tree/master/examples/python/web-service