Skip to main content
Filter by
Sorted by
Tagged with
0 votes
1 answer
64 views

Read logs from kubernetes pod from last read point

I want to read data from k8s pod either in form of logs or log file. I want to read it after specific time interval but from last read point. Previous data should not be repeated. Currently, for pod ...
Akash Shinde's user avatar
0 votes
0 answers
24 views

How to do retry in fabric8 watcher

I have a watcher witch watches a crd. When new action comes and fails I want my watcher to retry the crd action until it is done. I think this can be done in kubernetes oficial client. val watcher = ...
kaan simsek's user avatar
1 vote
2 answers
62 views

get current deployment name using fabric.io using java

I am trying to get current namespace and deployment name while using fabric.io. For namespace, I am using: k8sClient.getConfiguration().getNamespace() Any idea what should I be using for getting ...
Swaraj Shekhar's user avatar
1 vote
1 answer
285 views

ClassCastException Using Fabric8 to Retrieve Custom Resource Spec

I am using Fabric8 to perform CRUD operations on various K8S custom resources. When reading a resource and attempting to retrieve its spec, I am experiencing a ClassCastException between RawExtension ...
Scott's user avatar
  • 1,902
1 vote
0 answers
224 views

Fabric8 CRD-Generator - is it possible to generate CRD yaml with x-kubernetes-validations?

The CRD-Generator provided by the Fabric8 kubernetes-client allows you to generate the CRD yaml from Java classes. The documentation shows a number of annotations that can be applied to fields in the ...
Bryan Bende's user avatar
  • 18.6k
0 votes
1 answer
26 views

SerializationUtils not present in fabric 6.*

I am using the following lines using fabric client import io.fabric8.kubernetes.client.internal.SerializationUtils; String actualYaml = SerializationUtils.dumpAsYaml(job); This was working in fabric ...
CSUNNY's user avatar
  • 444
0 votes
0 answers
325 views

Java fabric8 Kubernetes-client: Any way of getting 'kubectl describe'?

I'd like to programmatically get a printout similar to 'kubectl describe pod...' without using the command line. I'd like to ensure there is not a direct way to do it before starting to collect all ...
Juan2's user avatar
  • 25
0 votes
1 answer
56 views

How to retrieve EKS services programatically?

I'm trying to get the list of services from EKS using Spring boot and Kotlin. I was able to make it work with the following using fabric8: @Configuration class AwsConfig { @Bean fun ...
lior-der's user avatar
0 votes
1 answer
235 views

Fabric8 exec command in pod: piped commands?

I'm trying to execute piped commands on a single call in a pod. I'd like to do something more sophisticated, but first I'd like to be able to simply count lines from a ls output like this: private ...
Juan2's user avatar
  • 25
0 votes
1 answer
340 views

Spring application fails to start because Fabric8ConfigReloadAutoConfiguration required a single bean but 2 were found

Background: The starting point was a micro developed on top of Spring Boot 2.7.14 and Spring Cloud 2021.0.8. With K8s 1.25 the application was starting without any problem. After the upgrade to Spring ...
Alberto San José's user avatar
1 vote
0 answers
222 views

fabric8 Informer for all Kubernetes Custom Resources in the cluster

I'm working with Kubernetes java library fabric8 and I'm able to react in my code when new Custom Resources for a specific kind (like MyCustomResource). I'm using an informer for this. An example of ...
Lobo's user avatar
  • 4,109
1 vote
2 answers
563 views

KubernetesClientException: Configured service account doesn't have access after an ungrade to Spring Cloud 2022.0.3

This question is NOT a generic question about how to correctly set a Service Account with the proper Role(s) in order to access K8s resources. It is about to ask for help in the context of a failure ...
Alberto San José's user avatar
0 votes
1 answer
153 views

How to delete Kubernetes Job object in Java via io.fabric8

I am using kubernetes io.fabric8 client to manage my Kubernetes Jobs. Using batch v1 apis kubernetesClient.batch().v1().jobs().inNamespace(namespace) I am not able to find a way to delete the Job by ...
Shekhar's user avatar
  • 79
0 votes
0 answers
118 views

Using fabric8 java library : getting error while copying the file from one pod to another pod

I am building springboot application using fabric8 java client library. I have use case to copy a file from this spring service pod to another pod running in the same namespace. This is working fine ...
sudhakar's user avatar
0 votes
1 answer
407 views

How to configure Fabric8 Maven Plugin to build with sudo

Problem I've been using the fabric8 maven plugin to build docker images. My user was part of the docker group and it all worked fine. I recently got a 'new more locked down' work computer and have ...
treekong's user avatar
  • 361
0 votes
1 answer
279 views

fabric8 Kubernetes Client Config keeps referencing kubeconfig

I am trying to set up a custom Kubernetes Client using the following Config config = new ConfigBuilder() .withMasterUrl(eksEndpoint) .withOauthTokenProvider(authTokenProvider) ....
Darragh MacKenna's user avatar
0 votes
2 answers
203 views

How to add a custom serializer/format for Java zoneddatetime with fabric8 maven plugin?

I am using fabric8 maven plugin to autogenerate Java classes for a CRD from it's yaml file. One of the fields is: updated_time: format: date-time type: string It's getting converted to a java....
xerocool's user avatar
  • 113
0 votes
1 answer
330 views

How to filter events from fabric8 sharedIndexInformer by labels?

I am on fabric8 kubernetes client v6.8.0 and initializing a sharedIndexInformer for a CRD like this: SharedIndexInformer<MyResource> informer = sharedInformerFactory....
xerocool's user avatar
  • 113
1 vote
1 answer
588 views

how to generate kubernetes yml file with io.fabric8?

I want generate kubernetes manifest files with fabric8. please help me. @EnableKubernetesMockClient public class KubernetesClientTests { KubernetesClient client; @Test public void ...
h.tayebi's user avatar
0 votes
0 answers
116 views

Read persistentVolumeClaims "Used" section from OCP with OpenShiftClient

I am using OpenShiftClient to read values from OCP. So far I was able to read the Name, Status and Capacity values from persistentVolumeClaims Page without any issues. But, when im reading all the ...
alm's user avatar
  • 1
0 votes
0 answers
193 views

use fabric8 kubernetes java lient delete resource with delete option not work

Boolean delete = apiClient.apps().statefulSets().inNamespace(namespace).withName(name) .withPropagationPolicy(DeletionPropagation.ORPHAN) .delete(); if (delete != null &...
hankjy's user avatar
  • 61
2 votes
1 answer
519 views

Which RBAC rules and permissions are required for Spring Cloud Kubernetes leader election to work on GKE?

We're using Spring Boot 3.0.5 with leader election from Spring Cloud Kubernetes version 3.0.2 (org.springframework.cloud:spring-cloud-kubernetes-fabric8-leader:3.0.2) that is based on the fabric8's ...
Johan's user avatar
  • 40k
0 votes
0 answers
304 views

Exception when updating config map using kubernates client

UseCase : When updating configmap with new entries along with existing entries. Issue : We are seeing below exception and I am not able to reproduce below issue frequently. I went through decompiled ...
santosh jk's user avatar
0 votes
2 answers
463 views

Disable spotify docker-maven-plugin in parent pom

I am using a parent POM like below <build> <pluginManagement> <plugins> <plugin> <groupId>com.spotify</...
melontart's user avatar
0 votes
1 answer
72 views

Pod size returned zero post kubernetes job creation

We are creating kubernates job using java kubernates client api (V:5.12.2) like below. I am struck with two places . Could some one please help on this ? podList.getItems().size() in below code ...
santosh jk's user avatar
0 votes
0 answers
275 views

How to attach Kubernetes Service with a running Pod

Here is my problem statement, I started a Kubernetes Service (Svc-1) which then starts Kubernetes Job (Job-1) and that job create a Pod (Pod-1). This service (Svc-1) actually receives job status like ...
Muhammad Tariq's user avatar
2 votes
1 answer
812 views

Java code manually Triggering kubernetes cronjob from the cluster

I'm trying to trigger cronjob manually(not scheduled) using fabric8 library but getting the following error: Caused by: io.fabric8.kubernetes.client.KubernetesClientException: Failure executing: POST ...
Ali Taha's user avatar
  • 249
1 vote
1 answer
605 views

fabric8 v6.1.1 Failure at creating Custom Resource with POST call Resulting in Not Found

New to fabric8 K8S client library. Recently was trying to create a custom resource object using fabric8 (v6.1.1) and got Not Found Message at the POST Call internally. Can list on the CRD client on ...
Anupam Panda's user avatar
0 votes
1 answer
265 views

Fabric8 Docker Maven Plugin: How to tag just one image? docker:tag

When I use docker:tag of Fabric.io's docker-maven-plugin, it tags all my images: [INFO] --- docker-maven-plugin:0.40.2:tag (tag-latest) @ tracker-service-app --- [INFO] DOCKER> Tagging image ...
Ondra Žižka's user avatar
0 votes
2 answers
825 views

Kubernetes job creation method showing as deprecated in IntelliJ. I am using Fabric8 Kubernetes Client api

I am using Fabric8 Kubernetes Client library to for Java to create Kubernetes job, but the create method is shown as deprecated. I checked all the available docs and I don't see that its deprecated ...
Muhammad Tariq's user avatar
1 vote
1 answer
1k views

Spring Cloud Kubernetes Leader Election Not Updating When Pod is Killed

I have a Spring Boot web application, packaged as a container that I am deploying in Kubernetes. The application has a scheduled job that must run periodically only on one of the running pods. I'm ...
Mark's user avatar
  • 5,480
0 votes
0 answers
61 views

Pattern for creating a long running k8s custom resource using fabric8.io

How to controller for a Custom Resource relating to an external resource which takes a while to create? I'm working on a creating a custom resource for standing up a CockroachLabs cloud database ...
Micke's user avatar
  • 246
1 vote
1 answer
257 views

How to delete HorizontalPodAutoscaler using Fabric8 k8s java client (version: 6.0.0)

Looks like there is no support to delete HorizontalPodAutoscaler using fabric8's K8S Java client ver:6.0.0. Although It is straightforward to create HorizontalPodAutoscaler using fabric8's K8S Java ...
Vinay's user avatar
  • 81
4 votes
1 answer
4k views

Is Fabric8 for kubernetes client deprecated?

I've seen the fabric8 documentation and it says that fabric8 is already deprecated. I would like to know if is recommendable to use this API or is better to use the official Kubernetes client I ...
rasilvap's user avatar
  • 2,045
1 vote
0 answers
362 views

How to restart DaemonSet using Fabric8 Java client

It is straightforward to restart a deployment or ReplicatSet using fabric8's K8S Java client. E.g. client.apps().deployments().inNamespace("test") .withName("test-deployment") ...
JustWonder's user avatar
  • 2,413
0 votes
3 answers
934 views

Fabric8 KubernetesClient sends volumeName as empty string for PersistentVolumeClaim causing Forbidden: spec is immutable after creation

I want to apply the following yaml multiple times with the fabric8 kubernetes-client apiVersion: v1 kind: PersistentVolumeClaim metadata: name: my-pvc spec: storageClassName: my-storage-class ...
lance-java's user avatar
  • 27.6k
0 votes
1 answer
142 views

Ensure ingress rule creation

My problem: i create ingress rule via kubernetes-client: try (InputStream is = IOUtils.toInputStream(crd, StandardCharsets.UTF_8)) { client.load(is).inNamespace(namespaceName)....
aarexer's user avatar
  • 553
2 votes
0 answers
512 views

How to delete Ingress rules with java synchronously

I am using Kubernetes and Ingress via fabric8 kubeclient. I have namespaces with user content and in each namespace i have an ingress rule. I need to remove the namespaces with user content on request....
dmorar's user avatar
  • 51
0 votes
1 answer
798 views

Fabric8 failed to watch custom resource in the junit test

I am trying to learn how to test custom resource watcher in the Fabric8, I follow the example from this link https://github.com/r0haaaan/kubernetes-mockserver-demo/blob/master/src/test/java/io/fabric8/...
Joe's user avatar
  • 673
1 vote
1 answer
626 views

Create DockerFile using fabric8 that copies shared libraries

I am trying to run DJL(Deep java library) within an application on my Kubernetes Cluster( Debian 11 nodes). I am using fabric8 and maven to dynamically create my DockerFile this is what generated so ...
Jeryl Cook's user avatar
  • 1,018
6 votes
1 answer
3k views

Deprecated APIs when trying to migrate cluster to v1.22

I attempted to migrate my cluster and I get the Migrate to updated APIs to upgrade to v1.22. error in GCP Control Panel: GCP Screenshot It list that I have called the following APIs: /apis/networking....
Artet_dev's user avatar
  • 129
0 votes
0 answers
85 views

Maven execute module pom using profile from parent pom

I want to build docker images using profile in parent pom, which looks like this: ... <build> <pluginManagement> <plugins> <plugin> ...
Kraton's user avatar
  • 1
1 vote
0 answers
179 views

Multiple version of spring-cloud-kubernetes jar

I am really confused in jars present in spring-cloud-kubernetes landscape. This page mentions 2 flavours of each jar, when to use which https://github.com/spring-cloud/spring-cloud-kubernetes#2-...
SauriBabu's user avatar
  • 434
0 votes
1 answer
518 views

Not able to access resource from kubernates operator

I am getting below error when I try to fetch resource(test-associations) which is created by assocOperator(kubernates operator deployed at stage level) in testns2 namespace from test-operator code (...
santosh jk's user avatar
1 vote
0 answers
883 views

How can I refer secrets from custom resource

How can I refer secret value from custom resource ? I am trying some thing like below but its not working configuration: baseUrl: "some url" username: "jack" password: ...
santosh jk's user avatar
1 vote
1 answer
91 views

Sequence kubernates Operators

I have two k8s operators say operatorA and operatorB . I have both custom resources present in microservice(helm/templates). how can I make sure custom resource for operatorB applied only after ...
santosh jk's user avatar
2 votes
0 answers
248 views

Spark 3.2 on Kubernetes keeps throwing okhttp3/okio EOFException

I'm using Spark 3.2.1 image that was built from the official distribution via `docker-image-tool.sh', on Kubernetes 1.18 cluster. Everything works fine, except for this error message every 90 seconds: ...
shay__'s user avatar
  • 3,950
2 votes
1 answer
1k views

How to connect to remote kubernetes cluster using k8s java api instead of fabric8 api

Iam able to connect to Kubernetes cluster using Fabric8 api with the following code : String masterUrl = "<Kube Master Url>"; Map<String, String> ...
user1188867's user avatar
  • 3,938
0 votes
1 answer
524 views

kubectl get deploy deploymentname -o yaml equivalent in Fabric8 client

I've an existing deployment in my Kubernetes cluster. I want to read its deployment.yaml file from Kubernetes environment using fabric8 client.Functionality similar to this command - kubectl get ...
Sapna Girdhani's user avatar
0 votes
0 answers
482 views

port forwarding kubernetes issue

I am running into a port forwarding issue with my service. The DB starts off via deployment YAML, and when my tomcat that is started manually tries to use it, it gets the connection but after 2 mins ...
Madhuri Devidi's user avatar

1
2 3 4 5
8