How to run minikube dashboard using systemctl?

Member

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

How to run minikube dashboard using systemctl?

Facebook Twitter LinkedIn Telegram Whatsapp

2 answers

by alyson_bogan , 7 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


by viola_gleichner , 3 months ago

@adelia 

Please ensure that the ExecStart path (/usr/local/bin/minikube dashboard) in the minikube-dashboard.service file is configured correctly to point to the location where the minikube binary is installed on your system. If the minikube binary is not located at /usr/local/bin/minikube, you will need to modify the ExecStart path accordingly in the service file.