Working with CR for version 6 #4393
Replies: 3 comments 5 replies
-
Beta Was this translation helpful? Give feedback.
-
@TheCodeAddiction as a reference exists a dedicated project to simplify writing operators in Java: |
Beta Was this translation helpful? Give feedback.
-
@rohanKanojia I am trying to create a CR, however the documentation you linked above is:
DetailAccording to the documentation, to create a CR, you do: The issue is, the Also, what is the |
Beta Was this translation helpful? Give feedback.
-
Intro
I am trying to make an k8 operator that is going to watch and work with custom resources. I am finding a lot of documentation and guides on how to do this, before version 6. I am currently struggling to find up-to date documentation for version 6.
Prerequisite
Question
I have created a KubernetesClient, using the
KubernetesClientBuilder().build();
and I am able to watch changes to a specific pod, using the Watch class.Watch watch = client.pods().withName(podName).watch(new Watcher<Pod>(){...}
Now I want to watch a specific CR. As I understand I need to use Generic Resource API? The example code shows how to get a POD in a namespace
Pod pod = client.resource(pod1).inNamespace("default").get();
. However, I am having a couple of issuesKubernetesClient
, it should be located in the java doc, but it isn't.I have been looking around on the docs here on github, but I am struggling to find any specific information on how to work with CR and I can't find any in-depth documentation about, for example, the KuberentesClient class and it's methods etc.
This might be a "me" problem, but I have googled in and out for a long time and read everywhere I can. Most online "tutorials" use an older version of fabric8. I have read the MIGRATION-v6.md document and tried to convert old fabric8 code to the newer version, but I am struggling to find in-depth documentation. It seems that if I had worked with fabric8, the migration guide would be amazing, but since I haven't I am a bit stuck.
TLDR:
Beta Was this translation helpful? Give feedback.
All reactions