Skip to content

Instantly share code, notes, and snippets.

@joepreludian
Created October 31, 2021 15:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save joepreludian/956cfce9507dc6ddd2a6dd81458709bd to your computer and use it in GitHub Desktop.
Save joepreludian/956cfce9507dc6ddd2a6dd81458709bd to your computer and use it in GitHub Desktop.
Create minikube starting automatically from systemd enabled systems
[Unit]
Description=Kickoff Minikube Cluster
After=docker.service
[Service]
Type=oneshot
ExecStart=/usr/local/bin/minikube start
RemainAfterExit=true
ExecStop=/usr/local/bin/minikube stop
StandardOutput=journal
User=jon
Group=jon
[Install]
WantedBy=multi-user.target
@joepreludian
Copy link
Author

joepreludian commented Oct 31, 2021

Steps to get this done:

  • Create a file inside /etc/systemd/system/;
  • Change this file in order to use your own User/Group; (Since minikube was initially configured to work in your own user)
  • After that run the command to update the systemd unit files: # systemctl reload-daemon
  • Now you will be able to enable your newly created systemd service: # systemctl enable minikube

Running at startup

Once you enabled the service, you will be able to run this on at the begin of your linux box. (I'm using a docker container to run minikube, so that's why it's important to add the After statement);

Have fun! =)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment