Skip to content

Storage Class stuck at pending #632

Closed Answered by wzshiming
Pithikos asked this question in Q&A
Discussion options

You must be logged in to vote

This example is missing the PV, so it doesn't work

here is a PV

apiVersion: v1
kind: PersistentVolume
metadata:
  name: pv-volume
  labels:
    type: local
spec:
  storageClassName: "my-storage-class"
  capacity:
    storage: 10Gi
  accessModes:
    - ReadWriteOnce
  hostPath:
    path: "/mnt/data"

In addition, Node also needs to be created

apiVersion: v1
kind: Node
metadata:
  annotations:
    node.alpha.kubernetes.io/ttl: "0"
    kwok.x-k8s.io/node: fake
  labels:
    beta.kubernetes.io/arch: amd64
    beta.kubernetes.io/os: linux
    kubernetes.io/arch: amd64
    kubernetes.io/hostname: kwok-node-1
    kubernetes.io/os: linux
    kubernetes.io/role: agent
    node-role.kubernetes.io/agent

Replies: 2 comments

Comment options

You must be logged in to vote
0 replies
Answer selected by Pithikos
Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants