Closed 0xfei closed 9 months ago
@0xfei: This issue is currently awaiting triage.
SIG Docs takes a lead on issue triage for this website, but any Kubernetes member can accept issues by applying the triage/accepted
label.
The triage/accepted
label can be added by org members by writing /triage accepted
in a comment.
Link: https://kubernetes.io/docs/tasks/run-application/run-replicated-stateful-application/#statefulset
I tried to reproduce this but failed.
[env]
❯ kubectl version --short
Flag --short has been deprecated, and will be removed in the future. The --short output will become the default.
Client Version: v1.24.8
Kustomize Version: v4.5.4
Server Version: v1.24.3
❯ minikube version
minikube version: v1.28.0
commit: 986b1ebd987211ed16f8cc10aed7d2c42fc8392f
[Outputs]
❯ kubectl get pods -l app=mysql --watch
NAME READY STATUS RESTARTS AGE
mysql-0 2/2 Running 0 59s
mysql-1 2/2 Running 0 34s
mysql-2 2/2 Running 0 20s
❯ kubectl get sc
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
standard (default) k8s.io/minikube-hostpath Delete Immediate false 3m51s
❯ kubectl get pvc
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
data-mysql-0 Bound pvc-2726201c-d1e8-4017-afa1-e908dd778600 10Gi RWO standard 4m49s
data-mysql-1 Bound pvc-13c6fe1f-61d1-48a3-8da2-189d9d6f9d10 10Gi RWO standard 4m24s
data-mysql-2 Bound pvc-a48f7ac3-d0b9-42e8-bda9-c516a3756ba5 10Gi RWO standard 4m10s
❯ kubectl get pv
NAME CAPACITY ACCESS MODES RECLAIM POLICY STATUS CLAIM STORAGECLASS REASON AGE
pvc-13c6fe1f-61d1-48a3-8da2-189d9d6f9d10 10Gi RWO Delete Bound default/data-mysql-1 standard 5m1s
pvc-2726201c-d1e8-4017-afa1-e908dd778600 10Gi RWO Delete Bound default/data-mysql-0 standard 5m26s
pvc-a48f7ac3-d0b9-42e8-bda9-c516a3756ba5 10Gi RWO Delete Bound default/data-mysql-2 standard 4m47s
❯ minikube addons list
|-----------------------------|----------|--------------|--------------------------------|
| ADDON NAME | PROFILE | STATUS | MAINTAINER |
|-----------------------------|----------|--------------|--------------------------------|
| ambassador | minikube | disabled | 3rd party (Ambassador) |
| auto-pause | minikube | disabled | Google |
| cloud-spanner | minikube | disabled | Google |
| csi-hostpath-driver | minikube | disabled | Kubernetes |
| dashboard | minikube | disabled | Kubernetes |
| default-storageclass | minikube | enabled ✅ | Kubernetes |
| efk | minikube | disabled | 3rd party (Elastic) |
| freshpod | minikube | disabled | Google |
| gcp-auth | minikube | disabled | Google |
| gvisor | minikube | disabled | Google |
| headlamp | minikube | disabled | 3rd party (kinvolk.io) |
| helm-tiller | minikube | disabled | 3rd party (Helm) |
| inaccel | minikube | disabled | 3rd party (InAccel |
| | | | [info@inaccel.com]) |
| ingress | minikube | disabled | Kubernetes |
| ingress-dns | minikube | disabled | Google |
| istio | minikube | disabled | 3rd party (Istio) |
| istio-provisioner | minikube | disabled | 3rd party (Istio) |
| kong | minikube | disabled | 3rd party (Kong HQ) |
| kubevirt | minikube | disabled | 3rd party (KubeVirt) |
| logviewer | minikube | disabled | 3rd party (unknown) |
| metallb | minikube | disabled | 3rd party (MetalLB) |
| metrics-server | minikube | disabled | Kubernetes |
| nvidia-driver-installer | minikube | disabled | Google |
| nvidia-gpu-device-plugin | minikube | disabled | 3rd party (Nvidia) |
| olm | minikube | disabled | 3rd party (Operator Framework) |
| pod-security-policy | minikube | disabled | 3rd party (unknown) |
| portainer | minikube | disabled | 3rd party (Portainer.io) |
| registry | minikube | disabled | Google |
| registry-aliases | minikube | disabled | 3rd party (unknown) |
| registry-creds | minikube | disabled | 3rd party (UPMC Enterprises) |
| storage-provisioner | minikube | enabled ✅ | Google |
| storage-provisioner-gluster | minikube | disabled | 3rd party (Gluster) |
| volumesnapshots | minikube | disabled | Kubernetes |
|-----------------------------|----------|--------------|--------------------------------|
Events:
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 11s default-scheduler Successfully assigned **default/mysql-0 to demo-m03**
Normal Pulled 10s kubelet Container image "amd64/mysql:5.7" already present on machine
Normal Created 10s kubelet Created container init-mysql
Normal Started 10s kubelet Started container init-mysql
Normal Pulled 8s (x2 over 9s) kubelet Container image "gcr.io/google-samples/xtrabackup:1.0" already present on machine
Warning Failed 8s (x2 over 9s) kubelet **Error: stat /tmp/hostpath-provisioner/default/data-mysql-0**: no such file or directory
the cluster has three nodes:
➜ k8s kubectl get nodes
NAME STATUS ROLES AGE VERSION
demo Ready control-plane 9h v1.25.3
demo-m02 Ready <none> 9h v1.25.3
demo-m03 Ready <none> 9h v1.25.3
default/mysql-0 to demo-m03, demo
is ready, but not demo-03
:
on demo-03:
root@demo-m03:/# ls -al /tmp/hostpath-provisioner/
total 4
drwxr-xr-x 2 root root 4096 Nov 30 02:48 .
drwxrwxrwt 5 root root 140 Nov 30 08:58 ..
on demo:
root@demo:/# ls -al /tmp/hostpath-provisioner/default/
total 12
drwxr-xr-x 3 root root 4096 Nov 30 08:06 .
drwxr-xr-x 3 root root 4096 Nov 30 06:49 ..
drwxrwxrwx 2 root root 4096 Nov 30 08:06 data-mysql-0
Warning FailedScheduling 10s default-scheduler 0/3 nodes are available: 3 pod has unbound immediate PersistentVolumeClaims. preemption: 0/3 nodes are available: 3 Preemption is not helpful for scheduling.
@jihoon-seo
/kind support
/kind support
@kundan2707 can you help me figure out what's going on, please.
I don't known why mysql-0
was not scheduled to demo(1st node of the cluster, and the control plane
), and demo-03(3rd node of the cluster
), THE CHOSEN ONE, did't create PVC/PV.
@jihoon-seo i am not able to get my pvc bound when i am using local storage class , but as stated in the documentation that
You need to either have a dynamic PersistentVolume provisioner with a default StorageClass, or statically provision PersistentVolumes yourself to satisfy the PersistentVolumeClaims used here.
as you are using dynamic PV provisioner , could you also check on static provision pv ?
@Kartik494 i am not able to get my pvc bound when i am using local storage class
The same with you, local storage cannot work either
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
/remove-lifecycle rotten
The Kubernetes project currently lacks enough contributors to adequately respond to all issues.
This bot triages un-triaged issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
I don't think we need to keep this issue alive. GitHub is not the right place for support requests @0xfei
If you're still looking for help, check Server Fault.
You can also post your question on the Kubernetes Slack or the Discuss Kubernetes forum.
/remove-lifecycle stale /lifecycle rotten
Closing in favour of https://github.com/kubernetes/website/issues/38188#issuecomment-1826382505
/close
@Gauravpadam: Closing this issue.
I'm using Mac M1 and minkube, failed here
PV/PVC/SC seems work fine, service and configmap can upload, but stateful was failed.
I run
kubectl describe pod mysql-0
Error: stat /tmp/hostpath-provisioner/default/data-mysql-0: no such file or directory