Minikube Tunnel: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
 
(One intermediate revision by the same user not shown)
Line 75: Line 75:


|valign="top"|
|valign="top"|
  systemctl stop  minikube-tunnel.service
  sudo systemctl stop  minikube-tunnel.service
  systemctl start minikube-tunnel.service
  sudo systemctl start minikube-tunnel.service


|-
|-
Line 124: Line 124:
| valign="top" |
| valign="top" |
* [https://medium.com/globant/load-balance-microservices-using-kubernetes-minikube-88b78dae4796 Minikube » Load balance » Micro-services]
* [https://medium.com/globant/load-balance-microservices-using-kubernetes-minikube-88b78dae4796 Minikube » Load balance » Micro-services]
* [[K8s/CSI Hostpath Driver]]
* [[Minikube Ingress DNS]]
* [[Minikube Ingress DNS]]
* [[Minikube Systemd]]
* [[Minikube Systemd]]
* [[Minikube Registry]]
* [[Minikube Registry]]
* [[K8s/Swiss Knife]]
* [[Free Up RAM]]
* [[Free Up RAM]]
* [[K8s/Ingress]]
* [[K8s/Run]]
* [[CIDR]]
* [[CIDR]]



Latest revision as of 18:39, 6 September 2024

sudo -i -u minikube
minikube tunnel --cleanup
minikube tunnel --cleanup=true
minikube status -ojson|jq -r .

Systemd

Line number: 19 meaningless, kept backed those lines for identical purpose

cat << INI | sudo tee /etc/systemd/system/minikube-tunnel.service >/dev/null
[Unit]
Description=Minikube Tunnel
Documentation=https://minikube.sigs.k8s.io/docs/commands/tunnel/
After=network-online.target containerd.service docker.service minikube.service
Requires=network-online.target containerd.service docker.service minikube.service
Wants=network-online.target docker.service minikube.service
AssertFileIsExecutable=/var/minikube/bin/minikube

[Service]
User=minikube
Group=minikube
ProtectProc=invisible
StandardOutput=journal
WorkingDirectory=/var/minikube

EnvironmentFile=-/etc/default/minikube
ExecStart=/var/minikube/bin/minikube tunnel --cleanup=true
ExecStartPost=/bin/bash -c "echo ${MAINPID} > /var/minikube/etc/tunnel.pid"

Restart=always
SendSIGKILL=no
TasksMax=infinity
TimeoutStopSec=infinity

[Install]
WantedBy=multi-user.target
INI

Playground

# check minikube user either exists or not
cat /etc/passwd|grep minikube
sudo usermod -aG sudo minikube
# minikube no-password sudo access add to EOL
sudo visudo
minikube ALL=(ALL) NOPASSWD: ALL
# login to minikube user and start tunneling
sudo -i -u minikube
minikube tunnel

sudo systemctl enable  --now  minikube-tunnel.service
sudo systemctl disable --now  minikube-tunnel.service
systemctl status minikube-tunnel.service
journalctl -xeu  minikube-tunnel.service
sudo systemctl stop  minikube-tunnel.service
sudo systemctl start minikube-tunnel.service

docker network prune -f
docker volume  prune -f
docker system  prune -f
docker image ls
cat <<'EXE' | bash
for d in system network volume
do docker ${d} prune -f;done
EXE
cat <<'EXE' | ssh [email protected]
for d in system network volume
do docker ${d} prune -f;done
EXE

References