Skip to content

K8SAutoscale InCluster Configuration Problem #1608

@lamchakchan

Description

@lamchakchan

I'm currently not able to get the k8sAutoscale() node to work. When the TICK script is enabled, I get an error returned.

cannot use the k8sAutoscale node, could not create kubernetes client: unknown kubernetes cluster ""

I've configured kapacitord using environment variables. With my kapacitor docker container launched within my Kubernetes cluster. I verified the environment variables exist.

printenv | grep KAPACITOR_KUBERNETES
KAPACITOR_KUBERNETES_ENABLED=true
KAPACITOR_KUBERNETES_IN_CLUSTER=true

I tried to find the initializer for the In-Cluster configuration and found this line. Should this reference the os.Getenv("KUBERNETES_SERVICE_HOST") instead of having http://kubernetes hardcoded in as the url?

https://github.com/influxdata/kapacitor/blob/master/services/k8s/client/client.go#L95

Version
Using official kapacitor:1.3 image

kapacitor version
Kapacitor 1.3.3 (git: HEAD ce586f35e89e75a1779e2b493caba15d66295a15)

Environment
Running inside Kubernetes 1.7.x within AWS

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions