Using Multiple profiles with Minikube
Kubernetes is the new Linux. K8s is the spec for the multi-poly cloud world. Running k8s could be very resource intensive, so is always a good idea being able to run things locally. For several reasons like Engineering Productivity, Tests and Experiments and so on and on. If you are working with Istio like I'm, you might realize it's a bit heavy to run local, especially if you do have other things running on k8s. Minikube is the goto solution for local kubernetes clusters. However, as I said before, it can get pretty heavy when Istio gets involved. So the solution is pretty simple, it not much advertised. Minikube has a profile feature which allows you to create multiple profiles. Each profile will be a 2GB DISK VM created in Virtualbox. This is great because now you can run multiple kubernetes versions and multiple clusters doing multi experiments. IMHO is always great to have a k8s cluster ready to test things so I have multiple profiles like istio, lightweight, tests, etc... The first time you create the profile takes some time, up to 10min worst case but after the profile created things are super fast.
Running Multiple profiles with Minikube
Cheers,
Diego Pacheco
Running Multiple profiles with Minikube
Minikube has powerful feature called profiles, this feature allow we create different virtual machine based on a name, each profile cost avg ~2GB disk space. I found this super useful since have istio(heavy weight) proile and I need todo some quick local tests and want fast bootup and less resource consuption.
minikube profile test
minikube start -p test
๐ minikube v1.0.0 on linux (amd64)
๐คน Downloading Kubernetes v1.14.0 images in the background ...
๐ฅ Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
๐ฟ Downloading Minikube ISO ...
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
2019/04/10 11:51:51 No matching credentials were found, falling back on anonymous
142.88 MB / 142.88 MB [============================================] 100.00% 0s
๐ถ "test" IP address is 192.168.99.100
๐ณ Configuring Docker as the container runtime ...
๐ณ Version of container runtime is 18.06.2-ce
โ Waiting for image downloads to complete ...
โจ Preparing Kubernetes environment ...
๐พ Downloading kubeadm v1.14.0
๐พ Downloading kubelet v1.14.0
๐ Pulling images required by Kubernetes v1.14.0 ...
๐ Launching Kubernetes v1.14.0 using kubeadm ...
โ Waiting for pods: apiserver proxy etcd scheduler controller dns
๐ Configuring cluster permissions ...
๐ค Verifying component health .....
๐ kubectl is now configured to use "test"
๐ Done! Thank you for using minikube!
alias k=kubectl
k get svc
k get nodes
minikube stop
k get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 26m
k get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready master 26m v1.14.0
โ Stopping "deploy" in virtualbox ...
๐ "deploy" stopped.
minikube profile deploy
minikube start -p deploy
๐ minikube v1.0.0 on linux (amd64)
๐คน Downloading Kubernetes v1.14.0 images in the background ...
๐ฅ Creating virtualbox VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
๐ถ "deploy" IP address is 192.168.99.100
๐ณ Configuring Docker as the container runtime ...
๐ณ Version of container runtime is 18.06.2-ce
โ Waiting for image downloads to complete ...
โจ Preparing Kubernetes environment ...
๐ Pulling images required by Kubernetes v1.14.0 ...
๐ Launching Kubernetes v1.14.0 using kubeadm ...
โ Waiting for pods: apiserver proxy etcd scheduler controller dns
๐ Configuring cluster permissions ...
๐ค Verifying component health .....
๐ kubectl is now configured to use "deploy"
๐ Done! Thank you for using minikube!
alias k=kubectl
k get svc
k get nodes
minikube stop
k get svc
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
kubernetes ClusterIP 10.96.0.1 <none> 443/TCP 26m
k get nodes
NAME STATUS ROLES AGE VERSION
minikube Ready master 26m v1.14.0
โ Stopping "deploy" in virtualbox ...
๐ "deploy" stopped.
Cheers,
Diego Pacheco