Thanks for replying, maybe I'm understanding it wrong (which is very likely).
Maybe a bit more detail.
So, when querying:
final Endpoints endpoints = k8sClient.endpoints()
.withName(name).get();
which works fine, however, when I want to register an informable to that, i.e.,
k8sClient
.endpoints()
.withName(serviceId.getValue())
.inform(endpointsHandler, resyncTimeInMillis);
I get an exception:
Caused by: io.fabric8.kubernetes.client.KubernetesClientException: endpoints "value" is forbidden: User "system:serviceaccount:default:default" cannot watch resource "endpoints" in API group "" in the namespace "default"
And that is not the configured service account (so my guess was that this is service account related, and it needs to be configured somehow) (yes this is done in a cluster)
Hello!
Could you please advise what is equivalent for command kubectl rollout status deployment/<depl-name>
in Kubernates client?
I'm bit confused. When I'm trying to fetch deployment status with:
kubernetesClient.apps().deployments().inNamespace(project)
.withName(name).get().getStatus().getConditions()
Getting such 2 conditions:
DeploymentCondition(
lastTransitionTime=2021-12-08T09:31:42Z,
lastUpdateTime=2021-12-08T16:12:17Z,
message=ReplicaSet "test-service-cdf767b67" has successfully progressed.,
reason=NewReplicaSetAvailable,
status=True,
type=Progressing,
additionalProperties={}),
DeploymentCondition(
lastTransitionTime=2021-12-17T10:29:15Z,
lastUpdateTime=2021-12-17T10:29:15Z,
message=Deployment has minimum availability.,
reason=MinimumReplicasAvailable,
status=True,
type=Available,
additionalProperties={})
Meanwhile for kubectl command:
>> kubectl rollout status deployment/test-service
deployment "test-service" successfully rolled out
ReplicaSet "test-service-cdf767b67" has successfully progressed
as indicator of successful deployment?
isReady()
DSL method available for Deployment. Under the hood it calls Readiness.isReady https://github.com/fabric8io/kubernetes-client/blob/master/kubernetes-client/src/main/java/io/fabric8/kubernetes/client/internal/readiness/Readiness.java#L77
Hi, I have created a pod using fabric8io kubernetes client. It was successful, Now I am trying to push a file to pod (uploading to pod). I have followed the way mentioned here,
https://itnext.io/copy-files-to-from-pods-in-java-using-fabric8-kubernetes-client-485e73335cb6
But i am facing error as,
java.lang.IllegalArgumentException: Provided arguments are not valid (file, directory, path)
at io.fabric8.kubernetes.client.dsl.internal.uploadable.PodUpload.upload(PodUpload.java:69) ~[kubernetes-client-5.11.0.jar:na]
I have verified the file directory and path.
Can anyone please help me how can I resolve this issue ?
PodUploadWebSocketListener failed with - null
crd-generator
module and notice that there's a lot of hard-coded assumptions, specifically around CRD versions (with v1beta1
and v1
the only supported versions). Is this module still something that's getting active effort? Does it need a new maintainer to get it to a non-preview state?
I am trying mock the kubernetes server, so the next call would return "true"
kubernetesClient.pods().inNamespace("ns").inform().hasSynced()
these are my expects:
server.expect().get()
.withPath("/api/v1/namespaces/ns/pods")
.andReturn(HttpURLConnection.HTTP_OK, expectedPodList)
.times(1);
server.expect()
.withPath("/api/v1/namespaces/ns/pods?allowWatchBookmarks=true&watch=true")
.andUpgradeToWebSocket().open()
.waitFor(20).andEmit(new WatchEvent(newPod, "ADDED")).done().times(1);