Skip to content

Instantly share code, notes, and snippets.

@aslafy-z
Created May 18, 2023 13:56
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save aslafy-z/3ca42690be7ef82b4a1b8c504936beb7 to your computer and use it in GitHub Desktop.
Save aslafy-z/3ca42690be7ef82b4a1b8c504936beb7 to your computer and use it in GitHub Desktop.
kind: Service
apiVersion: v1
metadata:
name: private
spec:
type: ExternalName
externalName: private.example.corp
ports:
- port: 443
protocol: TCP
targetPort: 443
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: published-private
annotations:
nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
nginx.ingress.kubernetes.io/upstream-vhost: "private.example.corp"
spec:
ingressClassName: nginx
rules:
- host: published-private.ext.example.com
http:
paths:
- backend:
service:
name: private
port:
number: 443
path: /
pathType: ImplementationSpecific
tls:
- hosts:
- published-private.ext.example.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment