Skip to main content

Problem starting calico-kube-controllers

Issue

  • Problem starting calico-kube-controllers
[karl1@element ~]$ kubectl logs -n kube-system calico-kube-controllers-f7868dd95-swpst 
2022-05-09 15:18:10.856 [INFO][1] main.go 88: Loaded configuration from environment config=&config.Config{LogLevel:"info", ReconcilerPeriod:"5m", CompactionPeriod:"10m", EnabledControllers:"node", WorkloadEndpointWorkers:1, ProfileWorkers:1, PolicyWorkers:1, NodeWorkers:1, Kubeconfig:"", HealthEnabled:true, SyncNodeLabels:true, DatastoreType:"kubernetes"}
W0509 15:18:10.857670       1 client_config.go:541] Neither --kubeconfig nor --master was specified.  Using the inClusterConfig.  This might not work.
2022-05-09 15:18:10.858 [INFO][1] main.go 109: Ensuring Calico datastore is initialized
2022-05-09 15:18:20.859 [ERROR][1] client.go 255: Error getting cluster information config ClusterInformation="default" error=Get https://10.152.183.1:443/apis/crd.projectcalico.org/v1/clusterinformations/default: context deadline exceeded
2022-05-09 15:18:20.859 [FATAL][1] main.go 114: Failed to initialize Calico datastore error=Get https://10.152.183.1:443/apis/crd.projectcalico.org/v1/clusterinformations/default: context deadline exceeded
[karl1@element ~]$ sudo vi /etc/modules-load.d/snap.microk8s.conf 

Environment

  • Element Enterprise Installer 1.0.0

Resolution

Edit /etc/modules and add in there a new line: br_netfilter . This will load br_netfilter at boot time. sudo microk8s stop to stop MicroK8s services Edit /var/snap/microk8s/current/args/kube-proxy and remove the --proxy-mode completely. sudo modprobe br_netfilter to load the br_netfilter if not already loaded. sudo microk8s start to start MicroK8s services

Root Cause

What is the root cause for the issue?

Formatting: This can be free form.