K8S กึ่งสำเร็จรูป

K8S VM Spec
Ubuntu Features
~$ sudo apt-get update \
&& sudo apt-get upgrade -y \
&& sudo apt-get dist-upgrade -y \
&& sudo apt-get clean \
&& sudo apt-get autoremove -y
Ubuntu update
Ubuntu Update finish
~$ sudo snap install microk8s --classic
~$ snap info microk8s
~$ snap install microk8s --channel {version/channel} --classic
MicroK8s install progress
MicrroK8s Install Success
~$ microk8s.kubectl get all --all-namespaces
kubernetes namespaces
~$ microk8s.kubectl cluster-info
Kubernetes cluster info
~$ microk8s.kubectl get no
Kubernetes Node info
~$ microk8s.enable dns dashboard
Kubernetes dns dashboard enable
~$  watch microk8s.kubectl get all --all-namespaces
Kubernetes DNS Dashboard
~$ microk8s.enable dns dashboard ingress
Kubernetes enable ingress dashboard
~$ microk8s.kubectl proxy --accept-hosts=.* --address=0.0.0.0 &
Kubernetes proxy start
http://{your_micro8ks_host_name}:8001/api/v1/namespaces/kube-system/services/https:kubernetes-dashboard:/proxy/
Kubernetes Dashboard login
Kubernetes Ingress dashboard
~$ sudo snap alias microk8s.kubectl kubectl
Docker pull redis image
~$ microk8s.enable --help
Kubernetes enable add-on
~$ microk8s.inspect
Kubernetes inspect
~$ sudo snap remove microk8s
Remove Kubernetes
$> sudo iptables -P FORWARD ACCEPT
$> sudo ufw default allow routed
$> microk8s.stop
$> microk8s.start
$> microk8s.reset
$> sudo snap remove microk8s

--

--

Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store