Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Not able to upload file to pod using fabric8 upload API #5188

Closed
Mayuri36 opened this issue May 31, 2023 · 2 comments
Closed

Not able to upload file to pod using fabric8 upload API #5188

Mayuri36 opened this issue May 31, 2023 · 2 comments

Comments

@Mayuri36
Copy link

Is your task related to a problem? Please describe

**Its issue with fabric8 version they are not working with user name password authentication.

I even tried to create empty maven project with just latest fabric8 version, and with latest version it’s not even possible to get list of pods.**

we are using -> <fabric8.version>6.3.1</fabric8.version>

Its observed that when we login from our local system to cluster . This code works fine uploading files properly

o.fabric8.kubernetes.client.KubernetesClientException: Failure executing: GET at: "cluster_namespace_podName".
Message: Forbidden! User "clustername "doesn't have permission. pods "" is forbidden: User "system:anonymous" cannot get resource "pods" in API group "" in the namespace "".

at io.fabric8.kubernetes.client.KubernetesClientException.copyAsCause(KubernetesClientException.java:238)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.waitForResult(OperationSupport.java:536)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handleResponse(OperationSupport.java:570)
at io.fabric8.kubernetes.client.dsl.internal.OperationSupport.handleGet(OperationSupport.java:482)
at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.handleGet(BaseOperation.java:742)
at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.getMandatory(BaseOperation.java:177)
at io.fabric8.kubernetes.client.dsl.internal.BaseOperation.require(BaseOperation.java:158)
at io.fabric8.kubernetes.client.dsl.internal.core.v1.PodOperationsImpl.validateOrDefaultContainerId(PodOperationsImpl.java:317)
at io.fabric8.kubernetes.client.dsl.internal.core.v1.PodOperationsImpl.getURL(PodOperationsImpl.java:308)
at io.fabric8.kubernetes.client.dsl.internal.core.v1.PodOperationsImpl.exec(PodOperationsImpl.java:282)
at io.fabric8.kubernetes.client.dsl.internal.uploadable.PodUpload.upload(PodUpload.java:67)
at io.fabric8.kubernetes.client.dsl.internal.uploadable.PodUpload.uploadFileData(PodUpload.java:86)
at io.fabric8.kubernetes.client.dsl.internal.uploadable.PodUpload.uploadFile(PodUpload.java:96)
at io.fabric8.kubernetes.client.dsl.internal.uploadable.PodUpload.upload(PodUpload.java:51)
at io.fabric8.kubernetes.client.dsl.internal.core.v1.PodOperationsImpl.lambda$upload$3(PodOperationsImpl.java:401)
at io.fabric8.kubernetes.client.utils.internal.OptionalDependencyWrapper.wrapRunWithOptionalDependency(OptionalDependencyWrapper.java:39)
at io.fabric8.kubernetes.client.dsl.internal.core.v1.PodOperationsImpl.upload(PodOperationsImpl.java:399)

Describe the solution you'd like

I should able to upload file to pod.

Describe alternatives you've considered

No response

Additional context

No response

@shawkins
Copy link
Contributor

I even tried to create empty maven project with just latest fabric8 version, and with latest version it’s not even possible to get list of pods.

Based upon the exception the user system:anonymous does not have permission to see pod resources. Are you expecting to be a different user?

@shawkins
Copy link
Contributor

shawkins commented Jul 1, 2023

Lookst to be a duplicate of #5298

@shawkins shawkins closed this as not planned Won't fix, can't repro, duplicate, stale Jul 1, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants