Skip to content

How to Watch with KubeConfig configured from cluster #55

Closed
@leroy0211

Description

@leroy0211

When creating applications which needs to Watch the kubernetes api, there is no way of creating a new KubeConfig object created by credentials provided by kubernetes (or openshift).

Basically the Config::fromCluster() is what we need, but then available on the KubeConfig class like

const kc = new k8s.KubeConfig();
kc.fromCluster();  // <-- this is missing and so required!

Or am I doing something completely wrong here?
It's just that the application which needs to query the kubernetes api, is running in kubernetes itself, so .kube/config files are not working in this usecase.

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