Skip to content

Instantly share code, notes, and snippets.

@mbtamuli
Created July 12, 2025 08:56
Show Gist options
  • Save mbtamuli/38dfd22216a690fdd0771c56845c906e to your computer and use it in GitHub Desktop.
Save mbtamuli/38dfd22216a690fdd0771c56845c906e to your computer and use it in GitHub Desktop.
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
nodes:
- role: control-plane
extraMounts:
- hostPath: /Users/mriyam.tamuli/temp
containerPath: /temp
apiVersion: v1
kind: PersistentVolume
metadata:
name: task-pv-volume
labels:
type: local
spec:
storageClassName: manual
capacity:
storage: 10Gi
accessModes:
- ReadWriteOnce
hostPath:
path: "/temp/data"
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: task-pv-claim
spec:
storageClassName: manual
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 3Gi
---
apiVersion: v1
kind: Pod
metadata:
name: test
spec:
containers:
- name: test
image: alpine
command: ["/bin/sh", "-c", "sleep 3600"]
volumeMounts:
- mountPath: "/usr/share/nginx/html"
name: task-pv-storage
volumes:
- name: task-pv-storage
persistentVolumeClaim:
claimName: task-pv-claim
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment