48 lines
980 B
YAML
48 lines
980 B
YAML
---
|
|
kind: PersistentVolumeClaim
|
|
apiVersion: v1
|
|
metadata:
|
|
name: pvc-smb
|
|
spec:
|
|
accessModes:
|
|
- ReadWriteMany
|
|
resources:
|
|
requests:
|
|
storage: 100Gi
|
|
storageClassName: smb
|
|
---
|
|
apiVersion: apps/v1
|
|
kind: Deployment
|
|
metadata:
|
|
name: busybox-smb
|
|
labels:
|
|
app: busybox
|
|
spec:
|
|
replicas: 1
|
|
template:
|
|
metadata:
|
|
name: busybox
|
|
labels:
|
|
app: busybox
|
|
spec:
|
|
nodeSelector:
|
|
"kubernetes.io/os": windows
|
|
containers:
|
|
- name: busybox
|
|
image: e2eteam/busybox:1.29
|
|
command:
|
|
- "powershell.exe"
|
|
- "-Command"
|
|
- "while (1) { Add-Content -Encoding Ascii C:\\mnt\\smb\\data.txt $(Get-Date -Format u); sleep 1 }"
|
|
volumeMounts:
|
|
- name: smb
|
|
mountPath: "/mnt/smb"
|
|
subPath: subPath
|
|
volumes:
|
|
- name: smb
|
|
persistentVolumeClaim:
|
|
claimName: pvc-smb
|
|
selector:
|
|
matchLabels:
|
|
app: busybox
|