Hey Folks,
Missed a day since what I had prepared would not work here it seems because the site won’t allow too big or too many code boxes. Perhaps it is a text to code box size ration thing. I don’t know. Anyways, I will simply have to post it in bits. Create a new namespace
kubectl create ns nginx
Manually create the pvc:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: nginxpvcclaim1
namespace: nginx
spec:
storageClassName: csi-hostpath-sc
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
Today create this deployment:
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: nginx
name: nginx
namespace: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: nginx
spec:
volumes:
- name: storage
persistentVolumeClaim:
claimName: nginxpvcclaim1
containers:
- image: nginx
name: nginx
ports:
- containerPort: 80
name: "http-server"
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: storage