stoneshi-yunify
redis-pvc现在看着应该正常了
1、kubectl get sc -A
bglab@master:~$ kubectl get sc -A
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
local (default) openebs.io/local Delete WaitForFirstConsumer false 5d20h
2、kubectl -n kubesphere-system describe pvc redis-pvc
bglab@master:~$ kubectl -n kubesphere-system describe pvc redis-pvc
Name: redis-pvc
Namespace: kubesphere-system
StorageClass: local
Status: Bound
Volume: pvc-3513125b-2514-4c4a-90e8-9d47b210ff66
Labels: <none>
Annotations: kubectl.kubernetes.io/last-applied-configuration:
{"apiVersion":"v1","kind":"PersistentVolumeClaim","metadata":{"annotations":{},"finalizers":["kubernetes.io/pvc-protection"],"name":"redis...
pv.kubernetes.io/bind-completed: yes
pv.kubernetes.io/bound-by-controller: yes
Finalizers: [kubernetes.io/pvc-protection]
Capacity: 2Gi
Access Modes: RWO
VolumeMode: Filesystem
Mounted By: redis-6fd6c6d6f9-zdpqc
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Warning ClaimLost 33m persistentvolume-controller Bound claim has lost reference to PersistentVolume. Data on the volume is lost!
Normal Provisioning 33m openebs.io/local_openebs-localpv-provisioner-84956ddb89-n8mjs_95e8738f-208c-4178-a487-d439305dd8fa External provisioner is provisioning volume for claim "kubesphere-system/redis-pvc"
Normal ProvisioningSucceeded 33m openebs.io/local_openebs-localpv-provisioner-84956ddb89-n8mjs_95e8738f-208c-4178-a487-d439305dd8fa Successfully provisioned volume pvc-3513125b-2514-4c4a-90e8-9d47b210ff66
3、kubectl -n kubesphere-system describe pod <redis-pod-name>
bglab@master:~$ kubectl -n kubesphere-system describe pod redis-6fd6c6d6f9-zdpqc
Name: redis-6fd6c6d6f9-zdpqc
Namespace: kubesphere-system
Priority: 0
Node: master/192.168.137.235
Start Time: Mon, 16 Nov 2020 14:54:25 +0800
Labels: app=redis
pod-template-hash=6fd6c6d6f9
tier=database
version=redis-4.0
Annotations: <none>
Status: Running
IP: 10.233.64.17
IPs:
IP: 10.233.64.17
Controlled By: ReplicaSet/redis-6fd6c6d6f9
Containers:
redis:
Container ID: docker://433c0939bb3f0315eedb42e5dbecf20139092ccb3b67446c62eb684b3ba65352
Image: redis:5.0.5-alpine
Image ID: docker-pullable://redis@sha256:50899ea1ceed33fa03232f3ac57578a424faa1742c1ac9c7a7bdb95cdf19b858
Port: 6379/TCP
Host Port: 0/TCP
State: Running
Started: Mon, 16 Nov 2020 14:54:35 +0800
Ready: True
Restart Count: 0
Limits:
cpu: 1
memory: 1000Mi
Requests:
cpu: 20m
memory: 100Mi
Environment: <none>
Mounts:
/data from redis-pvc (rw,path="redis-data")
/var/run/secrets/kubernetes.io/serviceaccount from default-token-d7ngn (ro)
Conditions:
Type Status
Initialized True
Ready True
ContainersReady True
PodScheduled True
Volumes:
redis-pvc:
Type: PersistentVolumeClaim (a reference to a PersistentVolumeClaim in the same namespace)
ClaimName: redis-pvc
ReadOnly: false
default-token-d7ngn:
Type: Secret (a volume populated by a Secret)
SecretName: default-token-d7ngn
Optional: false
QoS Class: Burstable
Node-Selectors: <none>
Tolerations: CriticalAddonsOnly
node-role.kubernetes.io/master:NoSchedule
node.kubernetes.io/not-ready:NoExecute for 300s
node.kubernetes.io/unreachable:NoExecute for 300s
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled <unknown> default-scheduler Successfully assigned kubesphere-system/redis-6fd6c6d6f9-zdpqc to master
Normal Pulled 2m56s kubelet, master Container image "redis:5.0.5-alpine" already present on machine
Normal Created 2m53s kubelet, master Created container redis
Normal Started 2m52s kubelet, master Started container redis
4、kubectl get pv/pvc
bglab@master:~$ kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-05f8d4eb-1eab-4198-a337-38cf2e182028 2Gi RWO Delete Bound kubesphere-system/openldap-pvc-openldap-0 local 5d20h
pvc-12bb4e83-4a1d-45bb-acd8-a61d6f7e6e39 20Gi RWO Delete Bound kubesphere-monitoring-system/prometheus-k8s-db-prometheus-k8s-0 local 95s
pvc-3513125b-2514-4c4a-90e8-9d47b210ff66 2Gi RWO Delete Bound kubesphere-system/redis-pvc local 43m
pvc-9d5973e7-b753-46c7-98c0-2fac0de1ce9b 20Gi RWO Delete Bound kubesphere-monitoring-system/prometheus-k8s-db-prometheus-k8s-1 local 30s
bglab@master:~$ kubectl get pvc -A
NAMESPACE NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
kubesphere-monitoring-system prometheus-k8s-db-prometheus-k8s-0 Bound pvc-12bb4e83-4a1d-45bb-acd8-a61d6f7e6e39 20Gi RWO local 107s
kubesphere-monitoring-system prometheus-k8s-db-prometheus-k8s-1 Bound pvc-9d5973e7-b753-46c7-98c0-2fac0de1ce9b 20Gi RWO local 45s
kubesphere-system openldap-pvc-openldap-0 Bound pvc-05f8d4eb-1eab-4198-a337-38cf2e182028 2Gi RWO local 5d20h
kubesphere-system redis-pvc Bound pvc-3513125b-2514-4c4a-90e8-9d47b210ff66 2Gi RWO local 44m