How to setup minikube lab on debian 9 with virtualbox
How to install Virtualbox on debian 9
sudo add-apt-repository "deb http://download.virtualbox.org/virtualbox/debian stretch contrib"
wget -q https://www.virtualbox.org/download/oracle_vbox_2016.asc -O- | sudo apt-key add -
wget -q https://www.virtualbox.org/download/oracle_vbox.asc -O- | sudo apt-key add -
sudo apt-get update
sudo apt-get install virtualbox-5.2
Remove old version of minikube
> minikube stop >VBoxManage unregistervm minikube --delete >minikube detele >``` ### Reinstall and start minikube
bash minikube start -v 99
## Some tunning ### Upgrade minikube CPUs and Memory
bash VBoxManage showvminfo minikube VBoxManage controlvm minikube poweroff VBoxManage modifyvm minikube –cpus 4 VBoxManage modifyvm minikube –memory “16384”
### Starting minikube
bash VBoxManage controlvm minikube poweron
### Network configuration forward all this port to the VM and kubernetes
bash for port in {30000..32767}; do VBoxManage controlvm minikube natpf1 “NodePort$port,tcp,,$port,,$port”; done
### Get docker environment
bash root:xavier/ # minikube docker-env [13:40:12] export DOCKER_TLS_VERIFY=“1” export DOCKER_HOST=“tcp://192.168.99.100:2376” export DOCKER_CERT_PATH=“/root/.minikube/certs” export DOCKER_API_VERSION=“1.35”
Run this command to configure your shell:
eval $(minikube docker-env)
Let’s run the docker-env command.
bash eval $(minikube docker-env)
Look into it
bash
root:xavier/ # eval $(minikube docker-env root:xavier/ # docker ps CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES 247862b60f5c 4689081edb10 “/storage-provisioner” About an hour ago Up About an hour k8s_storage-provisioner_storage-provisioner_kube-system_8b922a24-1b61-11e9-91fd-080027ae8abf_3 cd1bf40de337 01cfa56edcfc “/usr/local/bin/kube…” About an hour ago Up About an hour k8s_kube-proxy_kube-proxy-cqh5z_kube-system_b6d2d0b3-1b62-11e9-aaf6-080027ae8abf_0 a6c248ae4cc3 k8s.gcr.io/pause:3.1 “/pause” About an hour ago Up About an hour k8s_POD_kube-proxy-cqh5z_kube-system_b6d2d0b3-1b62-11e9-aaf6-080027ae8abf_0 b3fdb95eda10 k8s.gcr.io/pause:3.1 “/pause” About an hour ago Up About an hour k8s_POD_storage-provisioner_kube-system_8b922a24-1b61-11e9-91fd-080027ae8abf_1 2a712dbcd76d f59dcacceff4 “/coredns -conf /etc…” About an hour ago Up About an hour k8s_coredns_coredns-86c58d9df4-pk62q_kube-system_8aaef122-1b61-11e9-91fd-080027ae8abf_1 1a16c20fb90c f59dcacceff4 “/coredns -conf /etc…” About an hour ago Up About an hour k8s_coredns_coredns-86c58d9df4-dtmh9_kube-system_8aae76dc-1b61-11e9-91fd-080027ae8abf_1 e144d453fc14 k8s.gcr.io/pause:3.1 “/pause” About an hour ago Up About an hour k8s_POD_coredns-86c58d9df4-pk62q_kube-system_8aaef122-1b61-11e9-91fd-080027ae8abf_1 618ee878bcee k8s.gcr.io/pause:3.1 “/pause” About an hour ago Up About an hour k8s_POD_coredns-86c58d9df4-dtmh9_kube-system_8aae76dc-1b61-11e9-91fd-080027ae8abf_1 1bb590994288 3cab8e1b9802 “etcd –advertise-cl…” About an hour ago Up About an hour k8s_etcd_etcd-minikube_kube-system_8490cea1bf6294c73e0c454f26bdf714_1 fa0a54ba2b9c 9c16409588eb “/opt/kube-addons.sh” About an hour ago Up About an hour k8s_kube-addon-manager_kube-addon-manager-minikube_kube-system_5c72fb06dcdda608211b70d63c0ca488_1 c5485d727b93 177db4b8e93a “kube-apiserver –au…” About an hour ago Up About an hour k8s_kube-apiserver_kube-apiserver-minikube_kube-system_cb9d596b745250234f0556b9549b3235_1 f0f6ce2c801f b9027a78d94c “kube-controller-man…” About an hour ago Up About an hour k8s_kube-controller-manager_kube-controller-manager-minikube_kube-system_a27cf7498262006bec6c9e79ae3ebd16_1 52d235760a32 3193be46e0b3 “kube-scheduler –ad…” About an hour ago Up About an hour k8s_kube-scheduler_kube-scheduler-minikube_kube-system_9729a196c4723b60ab401eaff722982d_1 4c9f44dbd183 k8s.gcr.io/pause:3.1 “/pause” About an hour ago Up About an hour k8s_POD_etcd-minikube_kube-system_8490cea1bf6294c73e0c454f26bdf714_1 7f768e062efa k8s.gcr.io/pause:3.1 “/pause” About an hour ago Up About an hour k8s_POD_kube-controller-manager-minikube_kube-system_a27cf7498262006bec6c9e79ae3ebd16_1 8bcf8d6c8685 k8s.gcr.io/pause:3.1 “/pause” About an hour ago Up About an hour k8s_POD_kube-apiserver-minikube_kube-system_cb9d596b745250234f0556b9549b3235_1 8cc7d04098fb k8s.gcr.io/pause:3.1 “/pause” About an hour ago Up About an hour k8s_POD_kube-scheduler-minikube_kube-system_9729a196c4723b60ab401eaff722982d_1 6c7184b50945 k8s.gcr.io/pause:3.1 “/pause” About an hour ago Up About an hour k8s_POD_kube-addon-manager-minikube_kube-system_5c72fb06dcdda608211b70d63c0ca488_1
### Setup Kubernetes dashboard on minikube
bash root:xavier/ # minikube dashboard –url & [1] 17085 root:xavier/ # Enabling dashboard … Verifying dashboard health … Launching proxy … Verifying proxy health … http://127.0.0.1:46597/api/v1/namespaces/kube-system/services/http:kubernetes-dashboard:/proxy/
Using ssh to forward the dashboard
bash (host machine) $ ssh -L 8081:localhost:46597 xavier@10.0.0.154 surf to http://localhost:8081
### Setup Helm on minikube
bash curl https://raw.githubusercontent.com/kubernetes/helm/master/scripts/get > get_helm.sh chmod 700 get_helm.sh ./get_helm.sh ````
Run helm
root:xavier/ # helm init [14:12:43]
$HELM_HOME has been configured at /root/.helm.
Tiller (the Helm server-side component) has been installed into your Kubernetes Cluster.
Please note: by default, Tiller is deployed with an insecure 'allow unauthenticated users' policy.
To prevent this, run `helm init` with the --tiller-tls-verify flag.
For more information on securing your installation see: https://docs.helm.sh/using_helm/#securing-your-helm-installation
Happy Helming!
Test Helm
root:xavier/ # helm search [14:12:48]
NAME CHART VERSION APP VERSION DESCRIPTION
gitlab/auto-deploy-app 0.2.4 GitLab's Auto-deploy Helm Chart
gitlab/gitlab 0.2.0 11.0.0 Web-based Git-repository manager with wiki and issue-trac...
gitlab/gitlab-omnibus 0.1.37 GitLab Omnibus all-in-one bundle
gitlab/gitlab-runner 0.1.28 GitLab Runner
gitlab/kubernetes-gitlab-demo 0.1.29 GitLab running on Kubernetes suitable for demos
stable/acs-engine-autoscaler 2.2.0 2.1.1 Scales worker nodes within agent pools
stable/aerospike 0.1.7 v3.14.1.2 A Helm chart for Aerospike in Kubernetes
stable/anchore-engine 0.1.7 0.1.10 Anchore container analysis and policy evaluation engine s...
stable/apm-server 0.1.0 6.2.4 The server receives data from the Elastic APM agents and ...
stable/ark 1.0.0 0.8.2 A Helm chart for ark
stable/artifactory 7.2.1 6.0.0 Universal Repository Manager supporting all major packagi...
stable/artifactory-ha 0.2.1 6.0.0 Universal Repository Manager supporting all major packagi...
stable/aws-cluster-autoscaler 0.3.3 Scales worker nodes within autoscaling groups.
stable/bitcoind 0.1.3 0.15.1 Bitcoin is an innovative payment network and a new kind o...
stable/buildkite 0.2.3 3 Agent for Buildkite
stable/burrow 0.4.3 0.17.1 Burrow is a permissionable smart contract machine
stable/centrifugo 2.0.1 1.7.3 Centrifugo is a real-time messaging server.
stable/cert-manager v0.3.2 v0.3.0 A Helm chart for cert-manager
stable/chaoskube 0.7.0 0.8.0 Chaoskube periodically kills random pods in your Kubernet...