Assumption
You know how to create a VM using Vagrant, VirtualBox
Microk8s installation on Ubuntu
To install you should be super user on your Ubuntu VM
sudo -i
The snap is a package manager available in all Linux distributions. Here in the Ubuntu 18.04 validating is it available.
Check snap package tool available
snap versionNow we all set, run the install the microk8s command here the --classic is must
snap install microk8s --classic --edgeCheck the version
microk8s.kubectl version --shortCreate an alias to simplify your command
alias k="microk8s.kubectl"Let's use k now
k get nodes k get nodes -o wide # check the namespaces list k get namespaces k get all --all-namespacesThis might take couple of minutes on your laptop that is actually depends on your system capacity and speed. To start the microk8s Duplicate Terminal and try to run a pod. use same aliase here as well. alias k="microk8s.kubectl" on Vagrant user
sudo usermod -a -G microk8s vagrant sudo chown -f -R vagrant ~/.kubedeployment expose k expose deploy nginx --port 80 --target-port 80 type ClusterIP which elinks not installed, so lets install it.
microk8s.startOnce it is installed microk8s we can validate it by inspect option
microk8s.inspectIf there any warnings suggestions goahead and do that. To get all the command options for microk8s
microk8s -hTo get the status of kubenetes cluster
microk8s.statusTo get the dashboard
microk8s.enable dashboard dns metrics-server kubectl get all --namespaces microk8s kubectl get all -Akubernetes.service get the ip access in the browser To get the password use admin as user
microk8s.configTo login with Token option on the dashboard need to get the token. microk8s.kubectl -n kube-system get secret |grep kubernetes-dashboard-token microk8s.kubectl -n kube-system describe secrets kubernetes-dashboard-token To terminate your kubernetes cluster on microk8s
microk8s.stop
Deployment to microk8s
microk8s.kubectl create deployment microbot --image=dontrebootme/microbot:v1 microk8s.kubectl scale deployment microbot --replicas=2
For more experiments like this please do watch our YouTube channel
1 comment:
I really liked your blog article. Great.
Go Language online training
Go Language training
Hibernate online training
Hibernate training
Hyperion ESS Base online training
Hyperion ESS Base training
Hyperion Fdqm online training
Hyperion Fdqm training
Post a Comment