https://github.com/idvoretskyi/k8s-draft-demo
https://github.com/idvoretskyi/k8s-draft-demo
Last synced: 4 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/idvoretskyi/k8s-draft-demo
- Owner: idvoretskyi
- Created: 2025-06-02T18:01:39.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2025-06-02T18:09:46.000Z (about 1 year ago)
- Last Synced: 2025-06-03T07:47:02.721Z (about 1 year ago)
- Language: Smarty
- Size: 8.79 KB
- Stars: 0
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# k8s-draft-demo: Local Kubernetes Demo
This project demonstrates running a Python app on your local Kubernetes cluster (e.g., Minikube) using Helm and Draft-generated configs.
## Prerequisites
- [Docker](https://www.docker.com/)
- [Minikube](https://minikube.sigs.k8s.io/docs/)
- [Helm](https://helm.sh/)
- Python app files: `app.py` and `requirements.txt`
## Steps
1. **Start Minikube**
```sh
minikube start
```
2. **Build the Docker image inside Minikube**
```sh
eval $(minikube docker-env)
docker build -t k8s-draft-demo:latest .
```
3. **Deploy with Helm**
```sh
helm install k8s-draft-demo ./charts
```
4. **Access the App**
- If using `service.type=LoadBalancer` (default):
```sh
minikube tunnel
# In another terminal:
kubectl get svc -n default
# Find the EXTERNAL-IP and open in browser
```
- Or, port-forward:
```sh
kubectl port-forward svc/k8s-draft-demo 8080:80
# Visit http://localhost:8080
```
5. **Cleanup**
```sh
helm uninstall k8s-draft-demo
minikube stop
```
## Notes
- Edit `charts/values.yaml` to customize environment variables or ports.
- Make sure your `app.py` listens on port 80 (or update `containerPort`).
- If you change the image name or tag, update `values.yaml` accordingly.