97 lines
No EOL
1.9 KiB
YAML
97 lines
No EOL
1.9 KiB
YAML
### do not deploy
|
|
### you can copy and paste this, rename all occurences of "example"
|
|
---
|
|
apiVersion: v1
|
|
kind: Namespace
|
|
metadata:
|
|
name: example
|
|
---
|
|
apiVersion: v1
|
|
kind: PersistentVolumeClaim
|
|
metadata:
|
|
name: example-pvc
|
|
namespace: example
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteOnce
|
|
volumeMode: Filesystem
|
|
resources:
|
|
requests:
|
|
storage: 8Gi
|
|
---
|
|
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
|
|
volumeMounts:
|
|
- mountPath: "/var/www/html"
|
|
name: example-volume
|
|
volumes:
|
|
- name: example-volume
|
|
persistentVolumeClaim:
|
|
claimName: example-pvc
|
|
---
|
|
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:
|
|
# Use for Basic auth:
|
|
#nginx.org/basic-auth-secret: example-basic-auth-secret
|
|
# Use the following annotation if the backend only speaks HTTPS (fill out the service name accordingly):
|
|
#nginx.org/ssl-services: "example-service"
|
|
spec:
|
|
rules:
|
|
- host: "example.apps.yolokube.de"
|
|
http:
|
|
paths:
|
|
- pathType: Prefix
|
|
path: "/"
|
|
backend:
|
|
service:
|
|
name: example-service
|
|
port:
|
|
number: 80
|
|
# Use for Basic auth:
|
|
#---
|
|
#kind: Secret
|
|
#metadata:
|
|
# name: example-basic-auth-secret
|
|
# namespace: example
|
|
#apiVersion: v1
|
|
#type: nginx.org/htpasswd
|
|
#stringData:
|
|
# htpasswd: |
|
|
#test:$apr1$2XMU6EMv$f1MJ7zxqTS079YsB7Z.CX/ |