K8s/CSI Hostpath Driver: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
No edit summary
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
==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)'''.
{|
|valign='top' colspan='2'|
<syntaxhighlight lang="bash">
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
</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==
{|
{|
|valign="top"|
|valign="top"|
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
sudo -i -u minikube
minikube config
minikube stop
minikube stop
minikube delete --all
rm -rf ${HOME}/.minikube/*
</syntaxhighlight>
</syntaxhighlight>


Line 26: Line 59:
|-
|-
| valign="top" |
| valign="top" |
<syntaxhighlight lang="bash" highlight="1">
<syntaxhighlight lang="bash" highlight="2">
minikube addons enable volumesnapshots
minikube addons enable csi-hostpath-driver
minikube addons enable csi-hostpath-driver
minikube addons enable storage-provisioner
minikube addons enable storage-provisioner
Line 34: Line 68:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
kubectl get ns
kubectl get ns
kubectl get all -A
kubectl get all
kubectl get all -A
</syntaxhighlight>
</syntaxhighlight>


Line 40: Line 75:
<syntaxhighlight lang="bash">
<syntaxhighlight lang="bash">
minikube kubectl -- get ns
minikube kubectl -- get ns
minikube kubectl -- get all -A
minikube kubectl -- get all
minikube kubectl -- get all -A
</syntaxhighlight>
</syntaxhighlight>
|}
|}


Line 47: Line 84:
{|
{|
| valign="top" |
| valign="top" |
* [https://stackoverflow.com/questions/63559779/ K8s » Minikube » Persistent volume local FS]
* [https://stackoverflow.com/questions/44311179/ K8s » Minikube » Mount a Host folder in VM]
* [https://minikube.sigs.k8s.io/docs/tutorials/volume_snapshots_and_csi/ K8s » CSI Driver and Volume Snapshots]
* [https://minikube.sigs.k8s.io/docs/tutorials/volume_snapshots_and_csi/ K8s » CSI Driver and Volume Snapshots]
* [https://discuss.kubernetes.io/t/understanding-csi-architecture-and-communication/9404 K8s » Understanding CSI architecture]
* [https://discuss.kubernetes.io/t/understanding-csi-architecture-and-communication/9404 K8s » Understanding CSI architecture]
* [https://kubernetes.io/blog/2020/01/08/testing-of-csi-drivers/ K8s » Testing of CSI drivers]
* [https://sneegdhk.medium.com/connect-multiple-pods-to-the-same-pvc-with-different-mount-path-kubernetes-021e1f4e8946 K8s » Multiple Pods to the same PVC]
* [https://kubernetes.io/blog/2020/01/08/testing-of-csi-drivers/ K8s » Testing of CSI Drivers]
* [https://kubernetes-csi.github.io/docs/deploying.html K8s » Deploying CSI Driver]
* [https://kubernetes.io/docs/concepts/storage/volume-snapshots/ K8s » Volume » Snapshots]
* [https://github.com/kubernetes-sigs/aws-ebs-csi-driver K8s » AWS EBS CSI Driver]
* [https://www.velotio.com/engineering-blog/kubernetes-csi-in-action-explained-with-features-and-use-cases K8s » CSI in Action]
* [https://www.velotio.com/engineering-blog/kubernetes-csi-in-action-explained-with-features-and-use-cases K8s » CSI in Action]


| 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://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/#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/mount/#driver-mounts K8s » Minikube » Mount » Driver]
* [https://stackoverflow.com/questions/64664946/ K8s » <code>9P</code> vs. <code>hostPath</code> mount]
* [https://minikube.sigs.k8s.io/docs/handbook/mount/#9p-mounts K8s » Minikube » Mount » 9P]


| valign="top" |
| valign="top" |
Line 73: Line 125:


| valign="top" |
| valign="top" |
* [[Helm/Prometheus Stack|Helm » Prometheus Stack]]
* [[Helm/Prometheus|Helm » Prometheus]]
* [[Helm/SonarQube|Helm » SonarQube]]
* [[Helm/Camunda|Helm » Camunda]]
* [[Helm/Keycloak|Helm » Keycloak]]
* [[Helm/Grafana|Helm » Grafana]]
* [[Helm/Jenkins|Helm » Jenkins]]
* [[Helm/Nexus|Helm » Nexus]]
* [[Proxmox]]
* [[Proxmox]]
* [[Helm]]
* [[Helm]]


| valign="top" |
| valign="top" |
* [[EKSctl|AWS » EKS » CLI]]
* [[Terraform]]
* [[AWS CLI|AWS » CLI]]
* [[Google Cloud CLI|GCP » CLI]]
* [[Kubectl]]
* [[Ansible]]
* [[CIDR]]
* [[UFW]]


|}
|}

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

References