Skip to content
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

Supporting multiple kubelet root dirs across a cluster with CephFS in Kubernetes #4565

Open
Bpmm9012 opened this issue Apr 18, 2024 · 2 comments
Labels
component/deployment Helm chart, kubernetes templates and configuration Issues/PRs

Comments

@Bpmm9012
Copy link

Description:

We're running a Kubernetes (k8s) cluster with some machines where each machine has a different kubelet root directory configured as follows:

Machine 1: /container/k8s
Machine 2: /data/k8s
Machine 3: /var/lib/kubelet
The default CephFS configuration examples typically use a single hostPath like this:

Yaml
hostPath:
path: /var/lib/kubelet/...

However, this doesn't account for our multi-root directory setup. How can we configure ceph-csi (specifically for CephFS) to work seamlessly across all nodes considering their differing kubelet root directories?

Question:

What is the recommended approach to ensure that ceph-csi with CephFS can handle multiple kubelet root directories on a 3-node k8s cluster? Are there any best practices or specific configurations within ceph-csi or Kubernetes to accommodate such a scenario?

@Madhu-1
Copy link
Collaborator

Madhu-1 commented Apr 18, 2024

@Bpmm9012 yes it's possible but it complicates things as we need to have many daemonset templates which will use different kubelet path(s) which will have customer taints/tolerations to tell where the pod should go, IMHO we can document it but it will be difficult to maintain this yaml, @Bpmm9012 have you tried some symlink or something similar?

@nixpanic nixpanic added the component/deployment Helm chart, kubernetes templates and configuration Issues/PRs label Apr 19, 2024
@Bpmm9012
Copy link
Author

@Madhu-1 In appreciation of your explanation, setting up hard symlink seems like an effective approach. I will try to utilize the mount --bind command to made all different directories to the same directory.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/deployment Helm chart, kubernetes templates and configuration Issues/PRs
Projects
None yet
Development

No branches or pull requests

3 participants