Skip to content

VersionApi call not allowed when ClusterRole system:discovery is used in binding to a service account #153

@TheFrogPad

Description

@TheFrogPad

See https://github.com/kubernetes-client/java/blob/master/kubernetes/src/main/java/io/kubernetes/client/apis/VersionApi.java

Issue:

VersionApi.getCodeCall() uses /version/ when calling apiClient.buildCall() at line 102.

If you bind the ClusterRole system:discovery to a service account when RBAC is enabled the call fails with HTTP 403

Workaround:

kubectl create clusterrole get-versionresources --verb=get --non-resource-url='/version/*'
kubectl create clusterrolebinding get-versionresources-binding --clusterrole=get-versionresources --serviceaccount=mynamespace:myaccount

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