Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Select an option

  • Save egeneralov/20070c4153e62d2c1046b7fa52f2eb35 to your computer and use it in GitHub Desktop.

Select an option

Save egeneralov/20070c4153e62d2c1046b7fa52f2eb35 to your computer and use it in GitHub Desktop.
#!/bin/bash -xe
kubectl apply -f https://raw.githubusercontent.com/rancher/local-path-provisioner/master/deploy/local-path-storage.yaml
kubectl -n local-path-storage patch cm local-path-config -p '{"data":{"config.json":"{\n \"nodePathMap\": [\n {\n \"node\":\"DEFAULT_PATH_FOR_NON_LISTED_NODES\",\n \"paths\": [\n \"/data\"\n ]\n }\n ]\n}"}}'
kubectl -n local-path-storage patch deployment local-path-provisioner -p '{"spec":{"template":{"spec":{"$setElementOrder/containers":[{"name":"local-path-provisioner"}],"containers":[{"image":"egeneralov/local-path-provisioner:v0.0.12","name":"local-path-provisioner"}]}}}}'
kubectl patch storageclasses.storage.k8s.io local-path -p '{"metadata":{"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment