Add Service and Ingress with TLS

This commit is contained in:
samsep101
2026-01-05 02:14:32 +05:00
parent 97edafebd8
commit e8bc6eafc2
3 changed files with 36 additions and 0 deletions

24
ingress.yaml Normal file
View File

@@ -0,0 +1,24 @@
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: nginx-test
annotations:
cert-manager.io/cluster-issuer: "letsencrypt-prod"
nginx.ingress.kubernetes.io/rewrite-target: /
spec:
ingressClassName: nginx
tls:
- hosts:
- nginx-test.apps.kopikopi.com.ru
secretName: nginx-test-tls
rules:
- host: nginx-test.apps.kopikopi.com.ru
http:
paths:
- path: /
pathType: Prefix
backend:
service:
name: nginx-test
port:
number: 80

View File

@@ -2,3 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1
kind: Kustomization
resources:
- nginx-deployment.yaml
- service.yaml
- ingress.yaml

10
service.yaml Normal file
View File

@@ -0,0 +1,10 @@
apiVersion: v1
kind: Service
metadata:
name: nginx-test
spec:
selector:
app: nginx-test
ports:
- port: 80
targetPort: 80