From b1d7871a29520e15da88539bc483992fe364d746 Mon Sep 17 00:00:00 2001 From: prsimoes Date: Wed, 13 Mar 2019 16:53:52 -0700 Subject: [PATCH] Add KUBERNETES_SERVICE_HOST When using host network, the containers can't resolve kubernetes.default, thus not getting the metadata like pod name, namespace, etc. Using the environment variable KUBERNETES_SERVICE_HOST, which points to the current cluster API server, will allow that. --- .../k8s-with-rbac/falco-daemonset-configmap.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/integrations/k8s-using-daemonset/k8s-with-rbac/falco-daemonset-configmap.yaml b/integrations/k8s-using-daemonset/k8s-with-rbac/falco-daemonset-configmap.yaml index 363472cb1ec..1f9cea503da 100644 --- a/integrations/k8s-using-daemonset/k8s-with-rbac/falco-daemonset-configmap.yaml +++ b/integrations/k8s-using-daemonset/k8s-with-rbac/falco-daemonset-configmap.yaml @@ -25,7 +25,7 @@ spec: # env: # - name: SYSDIG_BPF_PROBE # value: "" - args: [ "/usr/bin/falco", "-K", "/var/run/secrets/kubernetes.io/serviceaccount/token", "-k", "https://kubernetes.default", "-pk"] + args: [ "/usr/bin/falco", "-K", "/var/run/secrets/kubernetes.io/serviceaccount/token", "-k", "https://$(KUBERNETES_SERVICE_HOST)", "-pk"] volumeMounts: - mountPath: /host/var/run/docker.sock name: docker-socket