Create Service Minikube Auto Start

Create Service Minikube Auto Start

Create Service Minikube Auto Start

6 Agus 2025

minikube

To automatically start Minikube when your system boots, you can create a custom systemd service.


📄 Step 1: Create a systemd Service File

Edit or create the service file:

sudo nano /etc/systemd/system/minikube.service

Paste the following content:

[Unit]
Description=Start Minikube Kubernetes Cluster
After=network.target docker.service
Requires=docker.service

[Service]
Type=oneshot
ExecStart=/usr/local/bin/minikube start --driver=docker --force
RemainAfterExit=yes
User=root
Environment=HOME=/root

[Install]
WantedBy=multi-user.target

🔄 Step 2: Reload and Enable the Service

sudo systemctl daemon-reexec
sudo systemctl daemon-reload
sudo systemctl enable minikube.service

▶️ Step 3: Control the Service

To stop Minikube:

sudo systemctl stop minikube.service

To start Minikube manually:

sudo systemctl start minikube.service

✅ Minikube will now automatically start with your system.