I'm pretty new to K8s.
I'm trying to make my app visible to the outside world. I have deployed this Nginx Ingress Controller with my apps, using Helm and helmfile which has given me an external ip address and a load balancer.
As I understand it, I now need an ingress resource
to configure the route mappings.
I plan on using this ingress resource as a starting point.
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: minimal-ingress
annotations:
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx-example
rules:
- http:
paths:
- path: /testpath
pathType: Prefix
backend:
service:
name: test
port:
number: 80
My apps are deployed in separate namespaces on port 80.
My question is: where do I put the yaml for creating the resources?
I want to keep everything in Helm if possible to make managing the configuration easier, so I don't want to use kubectl
unless i have to.
My helmfile
repositories:
- name: stable
url: https://charts.helm.sh/stable
- name: nginx-stable
url: https://helm.nginx.com/stable
releases:
# other apps configured here
- name: ingress-nginx
namespace: ingress
createNamespace: true
chart: nginx-stable/nginx-ingress
values:
- ./ingress/values.yaml
version: 0.10.4
installed: true
My Ingress Controller values.yaml:
---
rbac:
create: true
serviceAccount:
create: true
name: nginx-ingress-public
controller:
ingressClassResource:
enabled: true
default: true
replicaCount: 3
minAvailable: 3
updateStrategy:
rollingUpdate:
maxSurge: 3
maxUnavailable: 0