Yes. Before running helm install, a Kubernetes cluster must already exist and be running.
Helm does not create a Kubernetes cluster. It installs applications into an existing cluster.
In your case, Minikube creates the Kubernetes cluster, and Helm deploys your application into it.
1. Correct sequence for your application
Start the Kubernetes cluster
minikube start -p myapp \ --driver=docker \ --container-runtime=containerdIf the
myappprofile already exists but is stopped, Minikube starts the existing cluster. Otherwise, it creates a new cluster.Select the Kubernetes context
kubectl config use-context myappVerify that the cluster is ready:
kubectl get nodesInstall the Helm application
helm upgrade --install myapp ./helm/myapp \ --kube-context myapp \ --namespace myapp \ --create-namespace \ -f ./helm/myapp/values-minikube.yamlThis installs your application into the existing Minikube cluster.
Verify the application
kubectl get pods -n myapp kubectl get svc -n myapp kubectl get pvc -n myapp
2. What each tool creates
Tool | Responsibility |
|---|---|
| Creates or starts the Kubernetes cluster and its nodes |
| Inspects and manages Kubernetes resources |
| Installs your application resources into the cluster |
| Removes Helm-managed application resources |
| Stops the cluster without deleting it |
| Deletes the entire Minikube cluster |
3. What if the cluster already exists?
You do not need to recreate it before every Helm installation.
Check:
minikube status -p myappIf the cluster is already running, directly execute your Helm installation command.
If the cluster is stopped, run:
minikube start -p myappIf you previously ran helm uninstall, but the Minikube cluster is still running, you can directly reinstall using helm install or helm upgrade --install.
One additional point for your setup: Because your Helm charts use local PVs and PVCs, ensure that the required storage directories and PV definitions are available before installing workloads that depend on them. If your PVs are defined separately from the Helm chart, apply those manifests first.
In summary:
Minikube start → Kubernetes cluster ready → Helm install → Application Pods running
Helm manages applications, not the underlying Kubernetes cluster.
No comments:
Post a Comment