now that we have a container that does its duties at a bare minimum, lets run it inside a kube cluster.
That seemed scary so i had a coffee and a chat with AI where i learned we can use a “manifest” to run our cluster declaratively.
We need a “ingress” section to route traffic over the load balancer. I forgot to ask if connections between containers are allowed by default like its in docker…
As Traefik was a suggested load balancer, i chose that since i already like it as ssl terminating reverse proxy but never used it in such case. Im particularly interested how “similar” its configured here in kubernetes
▌in this project *but on target host), i build a container from the dockerfile that successfully ran via command @docker run -p 80:8080 -p443:8443 -e REPO_URL="https://github.com/" web:1.0@ / pls generate me a kube manifest that will run 2 instancesof locally available "web" image, but instead of double-mapping the ports, add a traefik as load balancer, and only load balancer (the web containers already terminate ssl) use a ingress section for that
codex, we have some errors in the IDE:
Source contains multiple documents; please use YAML.parseAllDocuments() at line 7, column 1:
codex:
Fixed. I split the multi-document manifest into single-document YAML files and removed k8s/web-traefik.yaml to eliminate the IDE warning.
<aside> 💡
the construct was very new for me and it took a few hours and iterations to get used to it.
Only working with it in the next section made some things get clearer, but ill include the codex transcript in the repo as chat-transcript-full-implementing-k8s-deployment.txt
</aside>