add storage
This commit is contained in:
parent
e1e98a940e
commit
99840b86b0
2 changed files with 111 additions and 1 deletions
|
@ -6,6 +6,19 @@ 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:
|
||||
|
@ -28,6 +41,13 @@ spec:
|
|||
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
|
||||
|
@ -53,7 +73,6 @@ metadata:
|
|||
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:
|
||||
|
|
91
test-storage.yaml
Normal file
91
test-storage.yaml
Normal file
|
@ -0,0 +1,91 @@
|
|||
### example app "privatebin" to test storage
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Namespace
|
||||
metadata:
|
||||
name: paste
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
metadata:
|
||||
name: paste-pvc
|
||||
namespace: paste
|
||||
spec:
|
||||
accessModes:
|
||||
- ReadWriteOnce
|
||||
volumeMode: Filesystem
|
||||
resources:
|
||||
requests:
|
||||
storage: 8Gi
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: paste-deployment
|
||||
namespace: paste
|
||||
labels:
|
||||
app: paste
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
matchLabels:
|
||||
app: paste
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: paste
|
||||
spec:
|
||||
securityContext:
|
||||
fsGroup: 82
|
||||
containers:
|
||||
- name: paste
|
||||
image: privatebin/nginx-fpm-alpine
|
||||
ports:
|
||||
- containerPort: 8080
|
||||
volumeMounts:
|
||||
- mountPath: "/srv/data"
|
||||
name: paste-volume
|
||||
volumes:
|
||||
- name: paste-volume
|
||||
persistentVolumeClaim:
|
||||
claimName: paste-pvc
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: paste-service
|
||||
namespace: paste
|
||||
spec:
|
||||
selector:
|
||||
app: paste
|
||||
ports:
|
||||
- protocol: TCP
|
||||
port: 80
|
||||
targetPort: 8080
|
||||
---
|
||||
apiVersion: networking.k8s.io/v1
|
||||
kind: Ingress
|
||||
metadata:
|
||||
name: paste-ingress
|
||||
namespace: paste
|
||||
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:
|
||||
rules:
|
||||
- host: "paste.apps.yolokube.de"
|
||||
http:
|
||||
paths:
|
||||
- pathType: Prefix
|
||||
path: "/"
|
||||
backend:
|
||||
service:
|
||||
name: paste-service
|
||||
port:
|
||||
number: 80
|
||||
tls:
|
||||
- hosts:
|
||||
- paste.apps.yolokube.de
|
||||
secretName: paste-cert
|
Loading…
Reference in a new issue