Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Assuming Docker Desktop Kubernetes, this is a reverse proxy
- # leveraging the ingress-nginx to reverse proxy with api.chucknorris.io:
- # curl -k -v -H "Host: chucknorris.local" https://kubernetes.docker.internal/jokes/random
- ---
- apiVersion: cert-manager.io/v1
- kind: ClusterIssuer
- metadata:
- name: chucknorris
- spec:
- selfSigned: {}
- ---
- apiVersion: v1
- kind: Service
- metadata:
- name: chucknorris
- spec:
- type: ExternalName
- externalName: api.chucknorris.io
- ---
- apiVersion: discovery.k8s.io/v1
- kind: EndpointSlice
- metadata:
- name: chucknorris-1
- labels:
- kubernetes.io/service-name: chucknorris
- addressType: FQDN
- ports:
- - protocol: TCP
- port: 443
- endpoints:
- - addresses:
- - "api.chucknorris.io"
- ---
- apiVersion: networking.k8s.io/v1
- kind: Ingress
- metadata:
- annotations:
- cert-manager.io/cluster-issuer: "chucknorris"
- nginx.ingress.kubernetes.io/proxy-ssl-verify: "true"
- nginx.ingress.kubernetes.io/proxy-ssl-verify-depth: "2"
- nginx.ingress.kubernetes.io/backend-protocol: "HTTPS"
- nginx.ingress.kubernetes.io/proxy-ssl-server-name: "on"
- nginx.ingress.kubernetes.io/proxy-ssl-name: api.chucknorris.io
- nginx.ingress.kubernetes.io/upstream-vhost: api.chucknorris.io
- nginx.ingress.kubernetes.io/proxy-ssl-secret: default/chucknorris-local
- name: chucknorris
- spec:
- ingressClassName: nginx
- tls:
- - hosts:
- - chucknorris.local
- secretName: chucknorris-local
- rules:
- - host: chucknorris.local
- http:
- paths:
- - path: /
- pathType: Prefix
- backend:
- service:
- name: chucknorris
- port:
- number: 443
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement