Last active
August 5, 2021 09:05
-
-
Save toonsevrin/f17a41cb8519f9ac7357825e881c6c60 to your computer and use it in GitHub Desktop.
This file contains hidden or 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: v1 | |
kind: ConfigMap | |
metadata: | |
name: nginx-forwarder-conf | |
data: | |
nginx.conf: | | |
events { | |
worker_connections 512; | |
} | |
stream { | |
server { | |
listen 80; | |
proxy_pass <service_to_forward>:80; | |
} | |
} | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-forwarder | |
spec: | |
replicas: 1 | |
selector: | |
matchLabels: | |
app: nginx-forwarder | |
template: | |
metadata: | |
labels: | |
app: nginx-forwarder | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:1.14.2 | |
ports: | |
- containerPort: 80 | |
volumeMounts: | |
- mountPath: /etc/nginx | |
readOnly: true | |
name: nginx-forwarder-conf | |
- name: nebula | |
image: <nebula image> | |
securityContext: | |
capabilities: | |
add: | |
- NET_ADMIN | |
volumeMounts: | |
- mountPath: /config.yaml | |
readOnly: true | |
name: nebula-conf | |
args: ["-config", "/config.yaml" ] | |
volumes: | |
- name: nebula-conf | |
configMap: | |
name: nebula-conf | |
items: | |
- key: nebula.conf | |
path: nebula.conf | |
- name: nginx-forwarder-conf | |
configMap: | |
name: nginx-forwarder-conf | |
items: | |
- key: nginx.conf | |
path: nginx.conf |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment