71 lines
No EOL
1.3 KiB
YAML
71 lines
No EOL
1.3 KiB
YAML
### 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: example-deployment
|
|
namespace: example
|
|
labels:
|
|
app: example
|
|
spec:
|
|
replicas: 3
|
|
selector:
|
|
matchLabels:
|
|
app: example
|
|
template:
|
|
metadata:
|
|
labels:
|
|
app: example
|
|
spec:
|
|
containers:
|
|
- name: example
|
|
image: testcontainers/helloworld
|
|
ports:
|
|
- containerPort: 8080
|
|
---
|
|
apiVersion: v1
|
|
kind: Service
|
|
metadata:
|
|
name: example-service
|
|
namespace: example
|
|
spec:
|
|
selector:
|
|
app: example
|
|
ports:
|
|
- protocol: TCP
|
|
port: 80
|
|
targetPort: 8080
|
|
---
|
|
apiVersion: networking.k8s.io/v1
|
|
kind: Ingress
|
|
metadata:
|
|
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: "example.apps.yolokube.de"
|
|
http:
|
|
paths:
|
|
- pathType: Prefix
|
|
path: "/"
|
|
backend:
|
|
service:
|
|
name: example-service
|
|
port:
|
|
number: 80
|
|
tls:
|
|
- hosts:
|
|
- example.apps.yolokube.de
|
|
secretName: example-cert |