A simple Kompose example using the tilt-avatars
sample app.
- Kompose
- Docker/Rancher Desktop
- Rancher Desktop requires less setup
- A Kubernetes cluster (Provided by Docker/Rancher Desktop)
- An ingress (Provided by Rancher Desktop)
- Install Docker Desktop
- Enable Kubernetes in Docker Desktop
- Install Helm and kubectl
- Install Traefik Proxy
helm repo add traefik https://traefik.github.io/charts && helm repo update && helm install traefik traefik/traefik
- Install Rancher Desktop in dockerd mode
- Forward
traefik
from port 80sudo sysctl net.ipv4.ip_unprivileged_port_start=0
(Only needed on Linux)- Open "Rancher Desktop" -> "Port Forwarding" -> check "Include Kubernetes services" and click "Forward" on "traefik" "web". Key in port "80"
- You should be able to visit http://localhost and see a "404 page not found"
- Run
docker compose build
- Run
kompose convert -o kompose.yaml
- Run
kubectl apply -f kompose.yaml
- Visit http://avatar.localdev.me