Skip to content
This repository was archived by the owner on Mar 18, 2020. It is now read-only.
This repository was archived by the owner on Mar 18, 2020. It is now read-only.

Cannot get pods in project 'default' but user account has cluster-reader permission  #54

@raffian

Description

@raffian

Hello,

Openshift: 3.6 (173.0.96)
kubernetes: 1.6.1 (5115d708d7)
Springboot: 1.5.10.RELEASE
spring-cloud-deployer-openshift: 1.2.1.RELEASE
spring-cloud-starter-task: 1.2.2.RELEASE

Getting the following error on startup in Openshift 3.6:
2018-03-29 18:18:45.157 ERROR 1 --- [ask-scheduler-6] o.s.integration.handler.LoggingHandler : org.springframework.messaging.MessageHandlingException:
nested exception is io.fabric8.kubernetes.client.KubernetesClientException:
Failure executing: GET at: https://kubernetes.default.svc/api/v1/namespaces/default/pods/demo-task-mx357o5q0x.
Message: Forbidden!Configured service account doesn't have access. Service account may have been revoked.
User "system:serviceaccount:mkt-dev:default" cannot get pods in project "default"., failedMessage=GenericMessage [payload=TaskLaunchRequest{uri='http://artifactory.den.ofi.com:80/release-snapshot-local/com/ofi/acme/demo-task/master-SNAPSHOT/demo-task-master-20171130.003905-6.jar', commandlineArguments=[], environmentProperties={}, deploymentProperties={}}, headers={id=6618a136-0bfd-c95a-ec9f-9aba6d6de483, timestamp=1522347525082}]

Why is it trying to access pods in project default?... our app is deployed to mkt-dev, and we confirmed the default user account has cluster-reader permission for accessing the kubernetes internal API.

mkt-dev/default cluster-reader, view

Is Edit permission also required for the default user account? Is it necessary to configure the namespace in application.properties? Right now we're not setting any special properties for this framework.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions