From e8bc6eafc21344fff550cf5811855d5bd6864c1e Mon Sep 17 00:00:00 2001 From: samsep101 Date: Mon, 5 Jan 2026 02:14:32 +0500 Subject: [PATCH] Add Service and Ingress with TLS --- ingress.yaml | 24 ++++++++++++++++++++++++ kustomization.yaml | 2 ++ service.yaml | 10 ++++++++++ 3 files changed, 36 insertions(+) create mode 100644 ingress.yaml create mode 100644 service.yaml diff --git a/ingress.yaml b/ingress.yaml new file mode 100644 index 0000000..aaea33b --- /dev/null +++ b/ingress.yaml @@ -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 diff --git a/kustomization.yaml b/kustomization.yaml index 5f84c74..5e03524 100644 --- a/kustomization.yaml +++ b/kustomization.yaml @@ -2,3 +2,5 @@ apiVersion: kustomize.config.k8s.io/v1beta1 kind: Kustomization resources: - nginx-deployment.yaml +- service.yaml +- ingress.yaml diff --git a/service.yaml b/service.yaml new file mode 100644 index 0000000..f133bc6 --- /dev/null +++ b/service.yaml @@ -0,0 +1,10 @@ +apiVersion: v1 +kind: Service +metadata: + name: nginx-test +spec: + selector: + app: nginx-test + ports: + - port: 80 + targetPort: 80