Skip to content

Instantly share code, notes, and snippets.

@tdudgeon
Created October 25, 2022 17:25
Show Gist options
  • Save tdudgeon/7537f6daaa1028e7bdfaec609f00c75c to your computer and use it in GitHub Desktop.
Save tdudgeon/7537f6daaa1028e7bdfaec609f00c75c to your computer and use it in GitHub Desktop.
K8S cinder volume on specific node
---
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: cinder-test-pvc
namespace: default
spec:
accessModes:
- ReadWriteMany
storageClassName: csi-cinder-sc-delete
resources:
requests:
storage: '1Gi'
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: nginx-deployment
labels:
app: nginx
spec:
replicas: 1
selector:
matchLabels:
app: nginx
template:
metadata:
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx:1.14.2
ports:
- containerPort: 80
volumeMounts:
- mountPath: /foo
name: cinder-test-volume
volumes:
- name: cinder-test-volume
persistentVolumeClaim:
claimName: cinder-test-pvc
nodeName: xch-dev-app-medium-a4
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment