plusserver / kubernetes-icinga

Kubernetes / Icinga2 integration.
Apache License 2.0
22 stars 8 forks source link

how to send kubeconfig to check_kubernetes ? #8

Closed aderumier closed 5 years ago

aderumier commented 5 years ago

Hi,

I'm currently to monitor multiple kubernetes cluster, with an external icinga2 server. On my icinga2 server2, I have the differents kubeconfig files for each cluster.

icinga2 service:

object CheckCommand "check_kubernetes" {

   command = [
     PluginDir + "/check_kubernetes"
   ]

   arguments = {
     "-kubeconfig" = "$kubernetes_config$"
     "-type" = "$kubernetes_type$"
     "-name" = "$kubernetes_name$"
     "-namespace" = "$kubernetes_namespace$"
   }

}

Where can I define the kubeconfig path in the deployment on kubernetes-icinga in the differents clusters ?

aderumier commented 5 years ago

Ok, I found it.

we simply need to add it in DEFAULT_VARS in configmap.yaml

DEFAULT_VARS: "{ kubernetes_config: /path/kubeconfig }"