-
Notifications
You must be signed in to change notification settings - Fork 457
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PV nodeAffinity.required.nodeSelectorTerms matchFields does not result in the kube scheduler placing pods on the same node as the PV #451
Comments
i met same issue. |
Same problem. After draining node pod will be scheduled on another node without PV resulting in crashloop or another incorrect behavior of app inside. |
Sorry for the delayed response. I'm on vacation this week. I plan to release 0.0.30 with a fix for the issue next week. |
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days. |
This issue was closed because it has been stalled for 5 days with no activity. |
Observing this on the latest v0.0.29 release and master-head local-path-provisoner on K3s v1.30.4+k3s1.
PVs created with the new local-path-provisoner image have an updated
nodeAffinity.required.nodeSelectorTerms
as depicted belowThis change originated from PR #414, that was subsequently included into the latest v0.0.29 release and master-head.
Deploying a pod specifying a
persistentVolumeClaim
to an associated pvc, the pod is scheduled on a different node, notmy-agent-host.example.com
. That pod then fails to initialize as it's unable to mount the PV volume path onmy-agent-host.example.com
.Previously on v0.0.28, the PV
nodeAffinity.required.nodeSelectorTerms
is as below and this works. The kube scheduler places the pod on the same node on which the PV local path volume is created, i.e.my-agent-host.example.com
in this example.It would seem switching the
nodeAffinity.required.nodeSelectorTerms
tomatchFields
for node fieldmetadata.name
does not work or the kube scheduler does not comply with that nodeAffinity.Also it's important to highlight on the K3s node, the value of
metadata.name
matchesmy-agent-host.example.com
.The text was updated successfully, but these errors were encountered: