Explorar el Código

Muevo instrucciones aquí

Celestino Rey hace 10 meses
padre
commit
22d8ad4d93
Se han modificado 1 ficheros con 56 adiciones y 2 borrados
  1. 56 2
      RANCHER_DESKTOP.md

+ 56 - 2
RANCHER_DESKTOP.md

@@ -15,7 +15,7 @@ Follow instructions in [Rancher Desktop Web](https://docs.rancherdesktop.io/gett
 
 ## Install local path provisioner
 
-In order to be able to work with persitent storage, it is usefull to deploy a local path provisioner so that all pvc created will assing their own persistent volume locally.
+In order to be able to work with persitent storage, it is useful to deploy a local path provisioner so that all pvc created will assing their own persistent volume locally.
 
 You can find intrunctions [here](https://github.com/rancher/local-path-provisioner)
 
@@ -209,6 +209,60 @@ to use the default storage class, just remove the ```storageClassName``` directi
 
 Bear in mind that the storage class is configured to ```WaitForFirstConsumer``` so the persistent volume will not be created until a pod request the PVC.
 
+### local path provisioner post-installation
+
+For some reason, the ```local-path-provisioner``` pod keeps on crashing. Inspecting the logs it says:
+
+    kubectl logs deployment.apps/local-path-provisioner -n local-path-storage time="2021-02-24T10:39:15Z" level=fatal msg="Error starting daemon: invalid empty flag helper-pod-file and it also does not exist at ConfigMap local-path-storage/local-path-config with err: configmaps \"local-path-config\" is forbidden: User \"system:serviceaccount:local-path-storage:local-path-provisioner-service- ccount\" cannot get resource \"configmaps\" in API group \"\" in the namespace \"local-path-storage\""
+
+to solve it, we need to apply a change to RBAC by creating a file ```role-local-path.yaml```:
+
+    ---
+    apiVersion: rbac.authorization.k8s.io/v1
+    kind: Role
+    metadata:
+      name: local-path-provisioner-workaround
+      namespace: local-path-storage
+    rules:
+    - apiGroups:
+        - ''
+      resources:
+        - configmaps
+      verbs:
+        - get
+        - list
+        - watch
+    ---
+    apiVersion: rbac.authorization.k8s.io/v1
+    kind: RoleBinding
+    metadata:
+      name: local-path-provisioner-workaround
+      namespace: local-path-storage
+    roleRef:
+      apiGroup: rbac.authorization.k8s.io
+      kind: Role
+      name: local-path-provisioner-workaround
+    subjects:
+    - kind: ServiceAccount
+      name: local-path-provisioner-service-account
+
+and applying (not creating) it with
+
+    kubectl apply -f role-local-path.yaml -n local-path-storage
+
+then restarting the deployment:
+
+    kubectl rollout restart deployment.apps/local-path-provisioner -n local-path-storage
+
+and finally checking that the pod doesn't crash:
+
+    kubectl get pod -n local-path-storage
+
+which should result in:
+
+    NAME                                      READY   STATUS    RESTARTS  AGE
+    local-path-provisioner-5897596697-n2gcg   1/1     Running   0         6m40s
+
 ## Deploy local registry
 
 If you need to create your own images, you will need a registry.
@@ -283,7 +337,7 @@ To deploy a local registry, first create a ```docker-registry.yaml``` file:
             persistentVolumeClaim:
               claimName: docker-registry-pvc
 
-and a ```ingress.yaml```:
+and an ```ingress.yaml```:
 
     apiVersion: networking.k8s.io/v1
     kind: Ingress