(Best option for development environments)
- Install Minikube: https://kubernetes.io/docs/setup/minikube/
Minikube settings: Global:
cat ~/.minikube/config/config.json
, Local:cat ~/.minikube/machines/minikube/config.json
, Command:minikube config [set|get] --help
- VirtualBox
- Install VirtualBox + VirtualBox VM VirtualBox Extension Pack: https://www.virtualbox.org/wiki/Downloads
- Set default driver:
minikube config set vm-driver virtualbox
- KVM2
- Install KVM2: https://github.com/kubernetes/minikube/blob/master/docs/drivers.md#kvm2-driver
- Set default driver:
minikube config set vm-driver kvm2
(from: https://kubernetes.io/docs/tasks/configure-pod-container/configure-persistent-volume-storage/)
- Create environment: Start MiniKube, mount folder & apply k8s scripts
make localv_up
- View results
make localv_results
Output: This is a HOSTPATH test
- Destroy environment
make localv_down
- Official documentation
- Create environment: Start Vagrant instances, provision K8s, provision GlusterFS, deploy Nginx pod
make glusterv_up
- View results
vagrant ssh k8sMaster
$ curl http://192.168.32.12:$(kubectl get svc mynginx -o json | jq -j '.spec.ports[0].nodePort')
Output: This is a GLUSTERFS test
- Destroy environment
make glusterv_down
- Official documentation
- Exposing services: Expose an application outside a Kubernetes cluster using a Service
(TODO)
- Commands
make gcev_apply
- Official documentation
- https://cloud.google.com/kubernetes-engine/docs/tutorials/persistent-disk
- https://github.com/GoogleCloudPlatform/kubernetes-engine-samples
- https://kubernetes.io/docs/concepts/storage/volumes/#gcepersistentdisk
- https://kubernetes.io/docs/concepts/storage/storage-classes/
- https://cloud.google.com/compute/docs/disks/#performance
- https://cloud.google.com/compute/docs/disks/add-persistent-disk#formatting