Closed Rokshan2016 closed 1 year ago
500 indicates some sort of unexpected server problem, not a permission problem.
500s should never happen, you will need to check the logs on the API server to get more details about what happened within the API server to throw a 500.
I tried to check. Did not find much information in the logs
nested exception is io.kubernetes.client.extended.kubectl.exception.KubectlException: io.kubernetes.client.openapi.ApiException: ] with root cause
o.kubernetes.client.openapi.ApiException: at io.kubernetes.client.openapi.ApiClient.handleResponse(ApiClient.java:973) at io.kubernetes.client.openapi.ApiClient.execute(ApiClient.java:885) at io.kubernetes.client.util.PatchUtils.patch(PatchUtils.java:56) at io.kubernetes.client.extended.kubectl.KubectlScale.execute(KubectlScale.java:66) at com.accenture.ip.df.ha.controller.Controller.r(Controller.java:134) at com.accenture.ip.df.ha.controller.Controller$$FastClassBySpringCGLIB$$13795f1b.invoke(
Also , is there a way to use this API with a service account key?
That's the Java (client) stack trace. We need the logs from the Kubernetes API Server (e.g. the go binary that implements the Kubernetes Server side)
And yes, the API works with a service account. If you use the default way to create a client and it is in a pod with a service account present, it will use that credential.
Instead of creating default client, can I use a service account json key to create the client ? We are using this in GKE
The Kubernetes project currently lacks enough contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle stale
/lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle stale
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues and PRs according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/remove-lifecycle rotten
/close
Please send feedback to sig-contributor-experience at kubernetes/community.
/lifecycle rotten
Instead of creating default client, can I use a service account json key to create the client ? We are using this in GKE
The default client builder in my understanding will support service accounts if detected https://github.com/kubernetes-client/java/blob/master/util/src/main/java/io/kubernetes/client/util/ClientBuilder.java#L85-L98
The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.
This bot triages issues according to the following rules:
lifecycle/stale
is appliedlifecycle/stale
was applied, lifecycle/rotten
is appliedlifecycle/rotten
was applied, the issue is closedYou can:
/reopen
/remove-lifecycle rotten
Please send feedback to sig-contributor-experience at kubernetes/community.
/close not-planned
@k8s-triage-robot: Closing this issue, marking it as "Not Planned".
Hi @brendanburns ,
I am trying this API
V1ReplicaSet scaledRs = Kubectl.scale(V1ReplicaSet.class).namespace("patient") .name("healthcare-access").replicas(4).execute(); String status = scaledRs.getStatus().toString();
Error
"timestamp": 1652718741715, "status": 500, "error": "Internal Server Error", "message": "io.kubernetes.client.openapi.ApiException: ",
What permission is required for Pod scaling?