K8s/CSI Hostpath Driver: Difference between revisions
Jump to navigation
Jump to search
(6 intermediate revisions by the same user not shown) | |||
Line 2: | Line 2: | ||
===Minikube » Mounts » 9P=== | ===Minikube » Mounts » 9P=== | ||
'''9P mounts''' are flexible and work across all hypervisors, but '''suffers from performance and reliability issues''' when used with large folders '''(>600 files)'''. | '''9P mounts''' are flexible and work across all hypervisors, but '''suffers from performance and reliability issues''' when used with large folders '''(>600 files)'''. | ||
{| | |||
|valign='top' colspan='2'| | |||
<syntaxhighlight lang="bash"> | <syntaxhighlight lang="bash"> | ||
MINIKUBE_BRIDGE="br-$(docker network ls -fname=minikube --format=json|jq -r '.ID')" | MINIKUBE_BRIDGE="br-$(docker network ls -fname=minikube --format=json|jq -r '.ID')" | ||
sudo ufw | sudo ufw allow in on ${MINIKUBE_BRIDGE} | ||
sudo ufw status numbered | sudo ufw status numbered | ||
sudo ufw reload | |||
</syntaxhighlight> | </syntaxhighlight> | ||
|valign='top'| | |||
<syntaxhighlight lang="bash"> | |||
cat << EXE | sudo -i -u minikube bash | |||
mkdir -p ${HOME}/volumes | |||
minikube mount ${HOME}/volumes:/var/minikube --port=1980 | |||
EXE | |||
</syntaxhighlight> | |||
|- | |||
|colspan='3'| | |||
---- | |||
|- | |||
|valign='top'| | |||
|valign='top'| | |||
|valign='top'| | |||
|} | |||
==Playground== | ==Playground== | ||
Line 74: | Line 96: | ||
| valign="top" | | | valign="top" | | ||
* [https://stackoverflow.com/questions/48534980/ K8s » Minikube » Mount Host directory into Pod] | |||
* [https://stackoverflow.com/questions/67345577/ K8s » Connect multiple pods to the same PVC] | * [https://stackoverflow.com/questions/67345577/ K8s » Connect multiple pods to the same PVC] | ||
* [https://minikube.sigs.k8s.io/docs/handbook/mount/ K8s » Minikube » Mounting filesystems] | * [https://minikube.sigs.k8s.io/docs/handbook/mount/ K8s » Minikube » Mounting filesystems] | ||
* [https://kubernetes.io/docs/concepts/storage/volumes/#hostpath K8s » Storage » Volumes » Hostpath] | * [https://kubernetes.io/docs/concepts/storage/volumes/#hostpath K8s » Storage » Volumes » Hostpath] | ||
* [https://kubernetes.io/docs/concepts/storage/volumes/#using-subpath K8s » Storage » Volumes » subPath] | |||
* [https://minikube.sigs.k8s.io/docs/handbook/filesync/ K8s » Minikube » Mount » File Sync] | * [https://minikube.sigs.k8s.io/docs/handbook/filesync/ K8s » Minikube » Mount » File Sync] | ||
* [https://minikube.sigs.k8s.io/docs/handbook/mount/#driver-mounts K8s » Minikube » Mount » Driver] | * [https://minikube.sigs.k8s.io/docs/handbook/mount/#driver-mounts K8s » Minikube » Mount » Driver] |
Latest revision as of 19:45, 19 September 2024
Minikube
Minikube » Mounts » 9P
9P mounts are flexible and work across all hypervisors, but suffers from performance and reliability issues when used with large folders (>600 files).
MINIKUBE_BRIDGE="br-$(docker network ls -fname=minikube --format=json|jq -r '.ID')"
sudo ufw allow in on ${MINIKUBE_BRIDGE}
sudo ufw status numbered
sudo ufw reload
|
cat << EXE | sudo -i -u minikube bash
mkdir -p ${HOME}/volumes
minikube mount ${HOME}/volumes:/var/minikube --port=1980
EXE
| |
| ||
Playground
sudo -i -u minikube
minikube config
minikube stop
|
minikube start
minikube docker-env
minikube addons list
|
minikube addons enable ingress
minikube addons enable ingress-dns
minikube addons enable metrics-server
|
| ||
minikube addons enable volumesnapshots
minikube addons enable csi-hostpath-driver
minikube addons enable storage-provisioner
|
kubectl get ns
kubectl get all
kubectl get all -A
|
minikube kubectl -- get ns
minikube kubectl -- get all
minikube kubectl -- get all -A
|