This repo includes python webserver and helm chart to show how k8s works
- Helm 3 How install
- kubectl How install
In the repo folder run:
helm template helm_chart/ > out
It will create manifests from this helm chart. To read more
You need to apply these manifests to your k8s cluster:
kubectl apply -f out
It will create all resources you've specified. To read more
After you need to expose your application in our case to a local machine:
kubectl port-forward svc/webserver 8080:80
Now you can see the application at this link http://localhost:8080
http://localhost:8080
- main page with a random color and it will create the test.txt file with a color namehttp://localhost:8080/color/red
- you can specify another color one from the color list "red","green","blue","blue2","darkblue","pink"http://localhost:8080/read_file
- to check data in the test.txt file
kubectl exec -it POD_NAME bash
Give you access to pod. To read more