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

Configuring local-path where it is predeployed #284

Open
CerturiumDev opened this issue Dec 7, 2022 · 0 comments
Open

Configuring local-path where it is predeployed #284

CerturiumDev opened this issue Dec 7, 2022 · 0 comments

Comments

@CerturiumDev
Copy link

CerturiumDev commented Dec 7, 2022

I'm using Rancher Desktop 1.6.2 and Kuebernetes version v1.24.7 and I'm trying to install local-path-provisioner 0.0.23 as instructed per README.md but I'm getting the following error:

PS C:\Work> kubectl create -f local-path-storage.yaml
namespace/local-path-storage created
serviceaccount/local-path-provisioner-service-account created
deployment.apps/local-path-provisioner created
configmap/local-path-config created
Error from server (AlreadyExists): error when creating ".\\local-path-storage.old.yaml": clusterroles.rbac.authorization.k8s.io "local-path-provisioner-role" already exists
Error from server (AlreadyExists): error when creating ".\\local-path-storage.old.yaml": clusterrolebindings.rbac.authorization.k8s.io "local-path-provisioner-bind" already exists
Error from server (AlreadyExists): error when creating ".\\local-path-storage.old.yaml": storageclasses.storage.k8s.io "local-path" already exist

It turns out, Rancher Desktop by default already deploys local-path in namespace kube-system (version 0.0.21):

PS C:\Work> kubectl get deployments -A
NAMESPACE            NAME                     READY   UP-TO-DATE   AVAILABLE   AGE
kube-system          coredns                  1/1     1            1           25m
kube-system          traefik                  1/1     1            1           25m
kube-system          local-path-provisioner   1/1     1            1           25m
kube-system          metrics-server           1/1     1            1           25m
local-path-storage   local-path-provisioner   0/1     1            0           5m31s

Although it deploys an outdated version where I cannot configure the Config as it is predeployed. I'm using the newly added RWX feature, which is only available in version 0.0.22 and upwards and it additionally requires changing local-path-config (adding sharedFileSystemPath to config.json).

I tried simply applying the config and changing the namespace to kube-system, and indeed it does update it and work fine:

PS C:\Work> kubectl apply -f local-path-storage.yaml
serviceaccount/local-path-provisioner-service-account configured
clusterrole.rbac.authorization.k8s.io/local-path-provisioner-role configured
clusterrolebinding.rbac.authorization.k8s.io/local-path-provisioner-bind configured
deployment.apps/local-path-provisioner configured
storageclass.storage.k8s.io/local-path configured
configmap/local-path-config configured

However, each time rancher is restarted the old version (0.0.21) with the default config (without sharedFileSystemPath, so RWX doesn't work) is deployed again and I need to reapply it all over again. How is this intended to be configured with Rancher Desktop and is there any way to change the version? Thanks in advance.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant