Skip to content

Instantly share code, notes, and snippets.

@chukaofili
Last active November 1, 2019 00:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 2 You must be signed in to fork a gist
  • Save chukaofili/9522b16c80a59c37528a8d0eb57be5fc to your computer and use it in GitHub Desktop.
Save chukaofili/9522b16c80a59c37528a8d0eb57be5fc to your computer and use it in GitHub Desktop.
Block storage script
#!/bin/bash
sudo su
mkdir -p /etc/kubernetes/kubelet-plugins/volume
## Uncomment line 8 and comment out line 7 below if you are using kubernetes 1.11+.
sed -i -e 's#\(KUBELET_EXTRA_ARGS=\)#\1--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume #' /etc/systemd/system/kubelet.service.d/10-kubeadm.conf
# echo "KUBELET_EXTRA_ARGS=--volume-plugin-dir=/etc/kubernetes/kubelet-plugins/volume " > /etc/default/kubelet # Use /etc/default/kubelet config file instead
systemctl daemon-reload
systemctl restart kubelet
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment