initial checkin

This commit is contained in:
Radar231 2021-07-23 15:58:35 -04:00
commit 2b0497a08d
5 changed files with 114 additions and 0 deletions

41
website_deployment.yml Normal file
View File

@ -0,0 +1,41 @@
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: website
spec:
selector:
matchLabels:
app: website
replicas: 1
strategy:
type: Recreate
template:
metadata:
labels:
app: website
spec:
affinity:
nodeAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
nodeSelectorTerms:
- matchExpressions:
- key: beta.kubernetes.io/arch
operator: In
values:
- arm64
containers:
- name: website
image: nginx
ports:
- containerPort: 80
name: "website"
volumeMounts:
- name: website
mountPath: "/usr/share/nginx/html"
volumes:
- name: website
persistentVolumeClaim:
claimName: website-pvc
# EOF

19
website_ingress.yml Normal file
View File

@ -0,0 +1,19 @@
---
apiVersion: extensions/v1beta1
kind: Ingress
metadata:
name: website
annotations:
kubernetes.io/ingress.class: traefik
spec:
rules:
- host: website.lan
http:
paths:
- path: /
pathType: Prefix
backend:
serviceName: website
servicePort: 80
# EOF

21
website_pv.yml Normal file
View File

@ -0,0 +1,21 @@
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: website-pv
labels:
name: website-pv
spec:
storageClassName: manual
capacity:
storage: 1Gi
accessModes:
- ReadWriteOnce
mountOptions:
- hard
- nfsvers=4.0
nfs:
server: 192.168.7.11
path: "/volume1/k8s-storage/delfax/website"
# EOF

19
website_pvc.yml Normal file
View File

@ -0,0 +1,19 @@
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: website-pvc
labels:
app: website
spec:
accessModes:
- ReadWriteOnce
storageClassName: "manual"
resources:
requests:
storage: 1Gi
selector:
matchLabels:
name: website-pv
# EOF

14
website_service.yml Normal file
View File

@ -0,0 +1,14 @@
---
apiVersion: v1
kind: Service
metadata:
name: website
spec:
ports:
- name: http
port: 80
selector:
# apply service to any pod with label app: nginx
app: website
# EOF