Skip to content

k8s.Autorest.HttpOperationException: Operation returned an invalid status code 'Forbidden' #890

Description

@dmachine7

Hi folks,

I have a container hosted as pod inside a cluster.
I want to use config maps and secrets from "xyz" namespace in cluster.

I am trying to get cluster config like this.
var k8sConfig = KubernetesClientConfiguration.InClusterConfig();

But getting exception
k8s.Autorest.HttpOperationException: Operation returned an invalid status code 'Forbidden'

Am I doing it incorrectly or is this some bug?
Please guide me to a solution or workaround to this.

Thank you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions