k8s/external-services/nextcloud.yaml

110 lines
1.8 KiB
YAML
Raw Normal View History

---
apiVersion: v1
kind: Service
metadata:
name: nextcloud
namespace: external-services
spec:
type: ClusterIP
ports:
- name: http
port: 80
...
---
apiVersion: discovery.k8s.io/v1
kind: EndpointSlice
metadata:
name: nextcloud
namespace: external-services
labels:
kubernetes.io/service-name: nextcloud
addressType: IPv4
ports:
- name: http
appProtocol: http
protocol: TCP
port: 23006
endpoints:
- addresses:
- "192.168.0.12"
conditions:
ready: true
...
---
apiVersion: cert-manager.io/v1
kind: Certificate
metadata:
name: nextcloud-cert
namespace: istio-system
spec:
secretName: nextcloud-cert
commonName: nextcloud.minhas.io
dnsNames:
- nextcloud.minhas.io
issuerRef:
name: letsencrypt-prod
kind: ClusterIssuer
group: cert-manager.io
...
---
apiVersion: networking.istio.io/v1beta1
kind: Gateway
metadata:
name: nextcloud-gateway
namespace: external-services
spec:
selector:
istio: ingressgateway
servers:
- port:
number: 443
name: https
protocol: HTTPS
tls:
mode: SIMPLE
credentialName: nextcloud-cert
hosts:
- nextcloud.minhas.io
...
---
apiVersion: networking.istio.io/v1beta1
kind: ServiceEntry
metadata:
name: nextcloud
namespace: external-services
spec:
hosts:
- nextcloud.minhas.io
addresses:
- 0.0.0.0/0
ports:
- number: 23006
name: nextcloud
protocol: HTTP
location: MESH_EXTERNAL
resolution: STATIC
endpoints:
- address: 192.168.0.12
...
---
apiVersion: networking.istio.io/v1beta1
kind: VirtualService
metadata:
name: nextcloud-gateway
namespace: external-services
spec:
hosts:
- nextcloud.minhas.io
gateways:
- nextcloud-gateway
http:
- match:
- uri:
prefix: /
route:
- destination:
port:
number: 80
host: nextcloud
...