-
Notifications
You must be signed in to change notification settings - Fork 4.9k
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
hostPath permissions wrong on multi node #11765
Comments
I don't think the hostpath provisioner even works on the second node. |
What does that mean? Has another component created the folders on the second node or is it a known limitation of the hostpath provisionioner? |
I mean if you create files on one node (like the first), they probably don't show up on other nodes (like the second). So I wonder if those directories are the result of trying to mount non-existing directories, or something like that ? Ultimately minikube would have to provide something like NFS, to offer persistent storage across multiple nodes... As long as "something else" (outside minikube) is transporting the files, then I guess it would continue to work as well. |
Oh, I see now that even if the hostpath provisioner would set the correct permissions, still it would only work on a very limited amound of usecases (e.g. ReadWriteOnce, temporary data with acceptable data loss). That brings up the question to me what kind of pv do people typically use/are expected to use on a multi node minikube? It looks to me as if host mounting |
Related #12165 |
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs. This bot triages issues and PRs according to the following rules:
You can:
Please send feedback to sig-contributor-experience at kubernetes/community. /lifecycle stale |
/remove-lifecycle stale |
Yeah, this is definitely still an issue in multinode. |
As a workaround I am deploying a daemonset which mounts the hostpath-provisioner directory and sets all subdirs to 777 every second. apiVersion: v1
kind: Namespace
metadata:
name: minikube-pv-hack
---
apiVersion: apps/v1
kind: DaemonSet
metadata:
name: minikube-pv-hack
namespace: minikube-pv-hack
spec:
selector:
matchLabels:
name: minikube-pv-hack
template:
metadata:
labels:
name: minikube-pv-hack
spec:
terminationGracePeriodSeconds: 0
containers:
- name: minikube-pv-hack
image: registry.access.redhat.com/ubi8:latest
command:
- bash
- -c
- |
while : ; do
chmod 777 /target/*
sleep 1
done
volumeMounts:
- name: host-vol
mountPath: /target
volumes:
- name: host-vol
hostPath:
path: /tmp/hostpath-provisioner/default |
minikube version: v1.21.0
Steps to reproduce the issue:
minikube start --nodes=2
Provision hostpath volumes to
minikube-m02
e.g. via statefulset examplecheck permissions via
minikube ssh -n minikube-m02 -- ls -lisa /tmp/hostpath-provisioner/default
(should be 777)The first node has the correct permissions and pods are working there.
Full output of
minikube logs
command:minikube-logs.txt
Full output of failed command:
The text was updated successfully, but these errors were encountered: