c12s-application-set/deploy/external-svc/base/proxy-service.yaml
2022-12-23 10:17:42 +01:00

59 lines
1.2 KiB
YAML

---
apiVersion: v1
kind: Service
metadata:
name: external-svc
namespace: infra
spec:
type: ClusterIP
ports:
- protocol: TCP
name: http
port: 80
targetPort: 80
---
apiVersion: discovery.k8s.io/v1
kind: EndpointSlice
metadata:
name: external-svc-1 # by convention, use the name of the Service
# as a prefix for the name of the EndpointSlice
namespace: infra
labels:
# You should set the "kubernetes.io/service-name" label.
# Set its value to match the name of the Service
kubernetes.io/service-name: external-svc
endpointslice.kubernetes.io/managed-by: gitops
addressType: IPv4
ports:
- name: 'http'
appProtocol: http
protocol: TCP
port: 80
endpoints:
- addresses:
- "10.1.2.3"
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: external-svc
namespace: infra
annotations:
kubernetes.io/ingress.class: "nginx"
#cert-manager.io/issuer: "letsencrypt-staging"
spec:
tls:
- hosts:
- my-svc.example.com
secretName: ts-my-app
rules:
- host: my-svc.example.com
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: external-svc
port:
number: 80