From e1e98a940ecb44908d7ce1e101d4402bd1078206 Mon Sep 17 00:00:00 2001 From: Aaron Riedel Date: Thu, 10 Nov 2022 19:50:38 +0100 Subject: [PATCH] make a useful example file --- example-deployment.yaml | 42 +++++++++++++++++++++++++++++------------ 1 file changed, 30 insertions(+), 12 deletions(-) diff --git a/example-deployment.yaml b/example-deployment.yaml index 6c90f7d..ba029fb 100644 --- a/example-deployment.yaml +++ b/example-deployment.yaml @@ -1,23 +1,30 @@ -### Just an unfinished example, do not deploy! +### do not deploy +### you can copy and paste this, rename all occurences of "example" +--- +apiVersion: v1 +kind: Namespace +metadata: + name: example --- apiVersion: apps/v1 kind: Deployment metadata: - name: test-deployment + name: example-deployment + namespace: example labels: - app: test + app: example spec: replicas: 3 selector: matchLabels: - app: test + app: example template: metadata: labels: - app: test + app: example spec: containers: - - name: test + - name: example image: testcontainers/helloworld ports: - containerPort: 8080 @@ -25,10 +32,11 @@ spec: apiVersion: v1 kind: Service metadata: - name: test-service + name: example-service + namespace: example spec: selector: - app: test + app: example ports: - protocol: TCP port: 80 @@ -37,17 +45,27 @@ spec: apiVersion: networking.k8s.io/v1 kind: Ingress metadata: - name: test-ingress + name: example-ingress + namespace: example + annotations: + kubernetes.io/ingress.class: "nginx" + cert-manager.io/cluster-issuer: letsencrypt-prod + acme.cert-manager.io/http01-edit-in-place: "true" + ingress.kubernetes.io/ssl-redirect: "false" spec: ingressClassName: nginx rules: - - host: "test.apps.yolokube.de" + - host: "example.apps.yolokube.de" http: paths: - pathType: Prefix path: "/" backend: service: - name: test-service + name: example-service port: - number: 80 \ No newline at end of file + number: 80 + tls: + - hosts: + - example.apps.yolokube.de + secretName: example-cert \ No newline at end of file