2022-09-07 23:43:39 +02:00
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: helloworld-deployment
|
|
|
|
labels:
|
|
|
|
app: helloworld
|
|
|
|
spec:
|
|
|
|
replicas: 3
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: helloworld
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: helloworld
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: helloworld
|
|
|
|
image: testcontainers/helloworld
|
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: helloworld-service
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: helloworld
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 80
|
|
|
|
targetPort: 8080
|
|
|
|
---
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: helloworld-ingress
|
2022-09-24 21:37:36 +02:00
|
|
|
annotations:
|
2022-09-25 18:49:58 +02:00
|
|
|
kubernetes.io/ingress.class: "nginx"
|
2022-09-24 21:37:36 +02:00
|
|
|
cert-manager.io/cluster-issuer: letsencrypt-staging
|
2022-09-25 18:49:58 +02:00
|
|
|
acme.cert-manager.io/http01-edit-in-place: "true"
|
|
|
|
ingress.kubernetes.io/ssl-redirect: "false"
|
2022-09-07 23:43:39 +02:00
|
|
|
spec:
|
|
|
|
rules:
|
|
|
|
- host: "lb1.yolokube.de"
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- pathType: Prefix
|
|
|
|
path: "/"
|
|
|
|
backend:
|
|
|
|
service:
|
|
|
|
name: helloworld-service
|
|
|
|
port:
|
2022-09-24 21:37:36 +02:00
|
|
|
number: 80
|
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- lb1.yolokube.de
|
2022-09-30 22:13:58 +02:00
|
|
|
secretName: helloworld-cert
|
|
|
|
############### Test
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Namespace
|
|
|
|
metadata:
|
|
|
|
name: aaron-test
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: test1-deployment
|
|
|
|
namespace: aaron-test
|
|
|
|
labels:
|
|
|
|
app: test1
|
|
|
|
spec:
|
|
|
|
replicas: 3
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: test1
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: test1
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: test1
|
|
|
|
image: testcontainers/helloworld
|
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: test1-service
|
|
|
|
namespace: aaron-test
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: test1
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 80
|
|
|
|
targetPort: 8080
|
|
|
|
---
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: test1-ingress
|
|
|
|
namespace: aaron-test
|
|
|
|
annotations:
|
|
|
|
kubernetes.io/ingress.class: nginx
|
|
|
|
cert-manager.io/cluster-issuer: letsencrypt-staging
|
|
|
|
#acme.cert-manager.io/http01-edit-in-place: "true"
|
|
|
|
ingress.kubernetes.io/ssl-redirect: "false"
|
|
|
|
spec:
|
|
|
|
rules:
|
|
|
|
- host: "test1.apps.yolokube.de"
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- pathType: Prefix
|
|
|
|
path: "/"
|
|
|
|
backend:
|
|
|
|
service:
|
|
|
|
name: test1-service
|
|
|
|
port:
|
|
|
|
number: 80
|
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- test1.apps.yolokube.de
|
|
|
|
secretName: test1-cert
|
|
|
|
---
|
|
|
|
apiVersion: apps/v1
|
|
|
|
kind: Deployment
|
|
|
|
metadata:
|
|
|
|
name: test2-deployment
|
|
|
|
namespace: aaron-test
|
|
|
|
labels:
|
|
|
|
app: test2
|
|
|
|
spec:
|
|
|
|
replicas: 3
|
|
|
|
selector:
|
|
|
|
matchLabels:
|
|
|
|
app: test2
|
|
|
|
template:
|
|
|
|
metadata:
|
|
|
|
labels:
|
|
|
|
app: test2
|
|
|
|
spec:
|
|
|
|
containers:
|
|
|
|
- name: test2
|
|
|
|
image: testcontainers/helloworld
|
|
|
|
ports:
|
|
|
|
- containerPort: 8080
|
|
|
|
---
|
|
|
|
apiVersion: v1
|
|
|
|
kind: Service
|
|
|
|
metadata:
|
|
|
|
name: test2-service
|
|
|
|
namespace: aaron-test
|
|
|
|
spec:
|
|
|
|
selector:
|
|
|
|
app: test2
|
|
|
|
ports:
|
|
|
|
- protocol: TCP
|
|
|
|
port: 80
|
|
|
|
targetPort: 8080
|
|
|
|
---
|
|
|
|
apiVersion: networking.k8s.io/v1
|
|
|
|
kind: Ingress
|
|
|
|
metadata:
|
|
|
|
name: test2-ingress
|
|
|
|
namespace: aaron-test
|
|
|
|
annotations:
|
|
|
|
kubernetes.io/ingress.class: nginx
|
|
|
|
cert-manager.io/cluster-issuer: letsencrypt-staging
|
|
|
|
cert-manager.io/issue-temporary-certificate: "true"
|
|
|
|
acme.cert-manager.io/http01-edit-in-place: "true"
|
|
|
|
#ingress.kubernetes.io/ssl-redirect: "true"
|
|
|
|
nginx.ingress.kubernetes.io/from-to-www-redirect: "true"
|
|
|
|
nginx.ingress.kubernetes.io/permanent-redirect: https://test2.apps.yolokube.de
|
|
|
|
spec:
|
|
|
|
rules:
|
|
|
|
- host: "test2.apps.yolokube.de"
|
|
|
|
http:
|
|
|
|
paths:
|
|
|
|
- pathType: Prefix
|
|
|
|
path: "/"
|
|
|
|
backend:
|
|
|
|
service:
|
|
|
|
name: test2-service
|
|
|
|
port:
|
|
|
|
number: 80
|
|
|
|
tls:
|
|
|
|
- hosts:
|
|
|
|
- test2.apps.yolokube.de
|
|
|
|
secretName: test2-cert
|