Created
October 10, 2021 21:54
-
-
Save jmrobles/0cf980f1b5e096a912935559038c0cae to your computer and use it in GitHub Desktop.
Apache NiFi deployment, service and ingress
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nifi | |
namespace: default | |
spec: | |
selector: | |
matchLabels: | |
app: nifi | |
template: | |
metadata: | |
labels: | |
app: nifi | |
spec: | |
containers: | |
- name: nifi | |
image: apache/nifi:1.14.0 | |
resources: | |
limits: | |
memory: "1Gi" | |
cpu: "500m" | |
ports: | |
- containerPort: 8443 | |
env: | |
- name: SINGLE_USER_CREDENTIALS_USERNAME | |
value: "admin" | |
- name: SINGLE_USER_CREDENTIALS_PASSWORD | |
valueFrom: | |
secretKeyRef: | |
key: nifi_password | |
name: credentials | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nifi-svc | |
namespace: default | |
spec: | |
selector: | |
app: nifi | |
ports: | |
- port: 8443 | |
targetPort: 8443 | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Ingress | |
metadata: | |
name: nifi | |
namespace: default | |
labels: | |
name: nifi | |
annotations: | |
kubernetes.io/ingress.class: "nginx" | |
cert-manager.io/cluster-issuer: "letsencrypt-prod" | |
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS" | |
nginx.ingress.kubernetes.io/upstream-vhost: "localhost:8443" | |
nginx.ingress.kubernetes.io/proxy-redirect-from: "https://localhost:8443" | |
nginx.ingress.kubernetes.io/proxy-redirect-to: "https://nifi.example.com" | |
spec: | |
tls: | |
- hosts: | |
- nifi.example.com | |
secretName: nifi-secret-tls | |
rules: | |
- host: nifi.example.com | |
http: | |
paths: | |
- path: "/" | |
backend: | |
serviceName: nifi-svc | |
servicePort: 8443 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment