Skip to content

Instantly share code, notes, and snippets.

@onefoursix
Created August 18, 2021 00:10
Show Gist options
  • Save onefoursix/383259ac64c985c01f3e7050d2d9fb1b to your computer and use it in GitHub Desktop.
Save onefoursix/383259ac64c985c01f3e7050d2d9fb1b to your computer and use it in GitHub Desktop.
SDC K8s Deployment manifest with path-based routing for ingress-nginx
apiVersion: 1
kind: List
items:
- apiVersion: apps/v1
kind: Deployment
metadata:
name: sdc1
namespace: ns1
labels:
app: sdc1
spec:
replicas: 1
selector:
matchLabels:
app: sdc1
template:
metadata:
labels:
app: sdc1
spec:
containers:
- name: sdc1
image: streamsets/datacollector:4.0.2
ports:
- containerPort: 18630
env:
- name: SDC_JAVA_OPTS
value: "-Xmx4g -Xms4g"
- name: SDC_CONF_SDC_BASE_HTTP_URL
value: https://gke.onefoursix.com/sdc1/
- name: SDC_CONF_HTTP_ENABLE_FORWARDED_REQUESTS
value: true
- apiVersion: v1
kind: Service
metadata:
name: sdc1
namespace: ns1
labels:
app: sdc1
spec:
type: NodePort
ports:
- name: http
port: 18630
targetPort: 18630
protocol: TCP
selector:
app: sdc1
- apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: sdc1
namespace: ns1
annotations:
kubernetes.io/ingress.class: nginx
nginx.ingress.kubernetes.io/ssl-redirect: \"false\"
nginx.ingress.kubernetes.io/rewrite-target: /$2
spec:
tls:
- hosts:
- gke.onefoursix.com
secretName: streamsets-tls
rules:
- host: gke.onefoursix.com
http:
paths:
- path: /sdc1(/|$)(.*)
backend:
serviceName: sdc1
servicePort: 18630
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment