Minikube Tunnel: Difference between revisions

From Chorke Wiki
Jump to navigation Jump to search
Line 98: Line 98:


| valign="top" |
| valign="top" |
* [https://medium.com/globant/load-balance-microservices-using-kubernetes-minikube-88b78dae4796 Minikube » Load balance » Micro-services]
* [[Minikube Ingress DNS]]
* [[Minikube Ingress DNS]]
* [[Minikube Systemd]]
* [[Minikube Systemd]]

Revision as of 02:44, 4 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

sudo systemctl enable  --now  minikube-tunnel.service
sudo systemctl disable --now  minikube-tunnel.service
systemctl status minikube-tunnel.service
journalctl -xeu  minikube-tunnel.service
systemctl stop  minikube-tunnel.service
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