Skip to content

Fix CLI Options - --master doesn't work without --kubeconfig #1614

Open
@aauren

Description

@aauren

What happened?

A user attempting to only override the kube-apiserver address with --master would expect that it would pick up the credentials mounted into the pod via /run/secrets/.

What did you expect to happen?

The APIs that kube-router uses from client-go forces kube-router to get the config from an actual kubeconfig file and if the user only supplies --master it looks like kube-router will always fail to contact the kube-apiserver.

In this case, the only way that the user can override the kube-apiserver details, is to overload the ENV vars that kubernetes supplies and set KUBERNETES_SERVICE_HOST & KUBERNETES_SERVICE_PORT

How can we reproduce the behavior you experienced?
Steps to reproduce the behavior:

  1. Launch kube-router with --master but no --kubeconfig file

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugoverride-staleDon't allow automatic management of stale issues / PRs

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions