make a useful example file
This commit is contained in:
parent
c32d25269e
commit
e1e98a940e
1 changed files with 30 additions and 12 deletions
|
@ -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
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: test-deployment
|
name: example-deployment
|
||||||
|
namespace: example
|
||||||
labels:
|
labels:
|
||||||
app: test
|
app: example
|
||||||
spec:
|
spec:
|
||||||
replicas: 3
|
replicas: 3
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: test
|
app: example
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
app: test
|
app: example
|
||||||
spec:
|
spec:
|
||||||
containers:
|
containers:
|
||||||
- name: test
|
- name: example
|
||||||
image: testcontainers/helloworld
|
image: testcontainers/helloworld
|
||||||
ports:
|
ports:
|
||||||
- containerPort: 8080
|
- containerPort: 8080
|
||||||
|
@ -25,10 +32,11 @@ spec:
|
||||||
apiVersion: v1
|
apiVersion: v1
|
||||||
kind: Service
|
kind: Service
|
||||||
metadata:
|
metadata:
|
||||||
name: test-service
|
name: example-service
|
||||||
|
namespace: example
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: test
|
app: example
|
||||||
ports:
|
ports:
|
||||||
- protocol: TCP
|
- protocol: TCP
|
||||||
port: 80
|
port: 80
|
||||||
|
@ -37,17 +45,27 @@ spec:
|
||||||
apiVersion: networking.k8s.io/v1
|
apiVersion: networking.k8s.io/v1
|
||||||
kind: Ingress
|
kind: Ingress
|
||||||
metadata:
|
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:
|
spec:
|
||||||
ingressClassName: nginx
|
ingressClassName: nginx
|
||||||
rules:
|
rules:
|
||||||
- host: "test.apps.yolokube.de"
|
- host: "example.apps.yolokube.de"
|
||||||
http:
|
http:
|
||||||
paths:
|
paths:
|
||||||
- pathType: Prefix
|
- pathType: Prefix
|
||||||
path: "/"
|
path: "/"
|
||||||
backend:
|
backend:
|
||||||
service:
|
service:
|
||||||
name: test-service
|
name: example-service
|
||||||
port:
|
port:
|
||||||
number: 80
|
number: 80
|
||||||
|
tls:
|
||||||
|
- hosts:
|
||||||
|
- example.apps.yolokube.de
|
||||||
|
secretName: example-cert
|
Loading…
Reference in a new issue