Introduction
Users who are running Terrafrom with the Kubernetes Scalyr Agent may encounter the following exception:
Exception in thread metric thread:
Traceback (most recent call last):
File "/usr/local/lib/python2.7/threading.py", line 801, in __bootstrap_inner
self.run()
File "/usr/share/scalyr-agent-2/py/scalyr_agent/builtin_monitors/kubernetes_monitor.py", line 3959, in run
self.__container_checker.start()
File "/usr/share/scalyr-agent-2/py/scalyr_agent/builtin_monitors/kubernetes_monitor.py", line 2500, in start
raise K8sInitException("Unable to initialize kubernetes cache")
K8sInitException: Unable to initialize kubernetes cache
This error is accompanied by messages similar to
“Could not find a suitable TLS CA certificate bundle, invalid path: /run/secrets/kubernetes.io/serviceaccount/ca.crt” within the /var/log/scalyr-agent-2/agent.log file.
Resolution
Explicitly defining
automountServiceAccountToken: true
within the Scalyr Agent DaemonSet may resolve this, as Terraform forcibly sets this value to false. More information can be found here: https://github.com/terraform-providers/terraform-provider-kubernetes/issues/263
Comments
0 comments
Please sign in to leave a comment.