asterion-digital / asterion-as-code

Deploying asterion digital infrastructure to aws and raspberry pi's using pulumi
2 stars 5 forks source link

Deploy nginx ingess controller to k3s cluster #9

Open shawngerrard opened 2 years ago

shawngerrard commented 2 years ago

The raspberry pi infrastructure requires http/s traffic incoming to the existing k3s cluster to be routed through nginx to our existing applications (wordpress, mariadb).

The intention is using load balancing principles to mitigate future bottlenecks and improve performance from heavy traffic accessing interfaces/end-points of our applications.

jmhbnz commented 2 years ago

Hey @shawngerrard - For clarity are we referring to nginx as a standalone application or nginx as an ingress controller for k3s?

shawngerrard commented 2 years ago

Fair call - probably need capabilities of both at some point, but I've fixed up the title to reflect the description and current need.

jmhbnz commented 2 years ago

Sounds good. A starting point for this would be setting up a new app - nginx directory in our project and using pulumi to deploy the controller via helm, refer: https://docs.nginx.com/nginx-ingress-controller/installation/installation-with-helm

Structuring it as an app - folder means we can share the same nginx ingress controller setup across multiple infra - deployments without having to duplicate multiple times into each one of those processes.

We've made the decision to go with k3s as our cluster so we can expect that each infra -* deployment should give us a consistent k3s environment that we can throw app - nginx on top of.

I would like to stick with helm for the deployment as that keeps allows us to replicate the same patterns we've used for app - wordpress.