37 lines
702 B
YAML
37 lines
702 B
YAML
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: web-service
|
|
namespace: testsite
|
|
spec:
|
|
ports:
|
|
- port: 80
|
|
protocol: TCP
|
|
targetPort: 80
|
|
name: http
|
|
selector:
|
|
app: web-backend
|
|
---
|
|
apiVersion: extensions/v1beta1
|
|
kind: Ingress
|
|
metadata:
|
|
name: testsite-ingress
|
|
namespace: testsite
|
|
annotations:
|
|
kubernetes.io/ingress.class: "nginx"
|
|
certmanager.k8s.io/cluster-issuer: letsencrypt-staging
|
|
certmanager.k8s.io/acme-challenge-type: http01
|
|
spec:
|
|
rules:
|
|
- host: test.k.zknt.org
|
|
http:
|
|
paths:
|
|
- backend:
|
|
serviceName: web-service
|
|
servicePort: 80
|
|
path: /
|
|
|
|
tls:
|
|
- hosts:
|
|
- test.k.zknt.org
|
|
secretName: testsite-certificate
|