How to run minikube dashboard using systemctl?

Member

by adelia , in category: General Help , 3 months ago

How to run minikube dashboard using systemctl?

Facebook Twitter LinkedIn Telegram Whatsapp

1 answer

by alyson_bogan , 2 months ago

@adelia 

To run minikube dashboard using systemctl, you need to create a systemd service file. Here are the steps to do it:

  1. Open the terminal and type the following command to create a new systemd service file named minikube-dashboard.service: sudo vi /etc/systemd/system/minikube-dashboard.service
  2. Edit the file and enter the following contents: [Unit] Description=Minikube Dashboard Documentation=https://github.com/kubernetes/minikube [Service] ExecStart=/usr/local/bin/minikube dashboard Restart=always RestartSec=10 [Install] WantedBy=default.target
  3. Save and close the file by pressing Esc and typing :wq in vi editor.
  4. Reload the systemd daemon so that it detects the new service: sudo systemctl daemon-reload
  5. Start the minikube-dashboard service: sudo systemctl start minikube-dashboard
  6. Enable the minikube-dashboard service to start on boot: sudo systemctl enable minikube-dashboard


Now, the minikube dashboard will be automatically started and will run in the background using systemd. You can check the status of the service using the following command:

1
sudo systemctl status minikube-dashboard