Add ingress-nginx-controller
This commit is contained in:
parent
08863ae6a4
commit
3cae5e3b6d
54
08-ingress-nginx-controller/README.md
Normal file
54
08-ingress-nginx-controller/README.md
Normal file
@ -0,0 +1,54 @@
|
||||
# 08-Ingress-Nginx-Controller
|
||||
|
||||
```bash
|
||||
helm upgrade --install ingress-nginx ingress-nginx --repo https://kubernetes.github.io/ingress-nginx --namespace ingress-nginx --create-namespace -f values.yaml
|
||||
|
||||
```
|
||||
|
||||
Example usage:
|
||||
|
||||
```yaml
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ingress-myservicea
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: myservicea.foo.org
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: myservicea
|
||||
servicePort: 8080
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1beta1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: ingress-myserviceb
|
||||
spec:
|
||||
ingressClassName: nginx
|
||||
rules:
|
||||
- host: myserviceb.foo.org
|
||||
http:
|
||||
paths:
|
||||
- path: /
|
||||
backend:
|
||||
serviceName: myserviceb
|
||||
servicePort: 8443
|
||||
tls:
|
||||
- hosts:
|
||||
- myserviceb.foo.org
|
||||
secretName: example-tls
|
||||
---
|
||||
# A secret must also be provided, likely by a cert-manager of some kind
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: example-tls
|
||||
data:
|
||||
tls.crt: <base64 encoded cert>
|
||||
tls.key: <base64 encoded key>
|
||||
type: kubernetes.io/tls
|
||||
```
|
12
08-ingress-nginx-controller/values.yaml
Normal file
12
08-ingress-nginx-controller/values.yaml
Normal file
@ -0,0 +1,12 @@
|
||||
## nginx configuration
|
||||
## Ref: https://github.com/kubernetes/ingress-nginx/blob/main/docs/user-guide/nginx-configuration/index.md
|
||||
|
||||
controller:
|
||||
service:
|
||||
externalIPs:
|
||||
- "10.69.69.51"
|
||||
nodePorts:
|
||||
# -- Node port allocated for the external HTTP listener. If left empty, the service controller allocates one from the configured node port range.
|
||||
http: "31451"
|
||||
# -- Node port allocated for the external HTTPS listener. If left empty, the service controller allocates one from the configured node port range.
|
||||
https: "31207"
|
Loading…
Reference in New Issue
Block a user