Summary: I am new to Helm and I am trying out some basic commands on my workstation but I am unable to deploy via Helm charts.
Setup:
I am using microk8s
v1.31 and helm
v3.16.2. I have repeatedly ran the microk8s status
command just to see if it is indeed running. I am running a single control-plane node.
Description: I started with using the following commands
helm create foo
helm install dummy foo
I see following output:
NAME: dummy
LAST DEPLOYED: Fri Oct 18 15:59:44 2024
NAMESPACE: default
STATUS: deployed
REVISION: 1
NOTES:...
However I don't see any pods in my default namespace when I run kubectl get pods
.
On running kubectl get deployments
I get the following output:
NAME READY UP-TO-DATE AVAILABLE AGE
dummy-foo 0/1 0 0 7m38s
Naturally, I had a look at the logs and running kubectl log deployments.app/dummy-foo
, I get the output:
error: watch closed before UntilWithoutRetry timeout
I haven't been able to make much progress in understanding this error. Any leads or suggestions will be highly appreciated. Thanks
Okay, so it turns out the issue was related to microk8s
and not helm
. I went to the troubleshooting page for microk8s
:https://microk8s.io/docs/troubleshooting#heading--common-issues.
The following command was useful:
sudo microk8s inspect
.
The command gave an error of the following form:
...
Inspecting dqlite
Inspect dqlite
cp: cannot stat '/var/snap/microk8s/7229/var/kubernetes/backend/localnode.yaml': No such file or directory
I came across this discussion on github: https://github.com/canonical/microk8s/issues/4361
I tried the solution provided by one of the users(specifically: https://github.com/canonical/microk8s/issues/4361#issuecomment-2200521421)
Note that the yaml file should be formatted as:
apiVersion: v1
kind: ConfigMap
metadata:
name: localnode-config
namespace: kube-system
data:
address: 192.168.1.100:19001
role: node
I ran the microk8s inspect
command again and there were no errors.
Subsequently, I re ran all the helm commands I tried earlier and now I can see the pod and the deployment in the default namespace.
kubectl get deployments
NAME READY UP-TO-DATE AVAILABLE AGE
dummy-foo 1/1 1 1 129m
kubectl get pods
NAME READY STATUS RESTARTS AGE
dummy-foo-6566f5f7b9-7d7b2 1/1 Running 1 (6m55s ago) 51m