# Java client and custom resources

**URL:** <https://discuss.kubernetes.io/t/java-client-and-custom-resources/10920>\
**Category:** General Discussions\
**Created:** [May 15, 2020, 6:33am UTC](https://discuss.kubernetes.io/t/java-client-and-custom-resources/10920 "2020-05-15T06:33:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![franck102](https://avatars.discourse-cdn.com/v4/letter/f/35a633/32.png) [@franck102](https://discuss.kubernetes.io/u/franck102)\
**Post date:** [May 15, 2020, 6:33am UTC](https://discuss.kubernetes.io/t/java-client-and-custom-resources/10920/1 "2020-05-15T06:33:36Z")

</div>

Hi all,

Is there any guide or example somewhere that describes how to use the Java client libraries ([https://github.com/kubernetes-client/java](https://github.com/kubernetes-client/java)) to create or modify custom resources in the cluster?

I would rather use a generic API to upload a yaml spec (without generating a CRD-specific API), but I can’t seem to find any example… basically I am looking for the java equivalent of  
kubectl apply -f resource.yaml

Thanks!  
Franck

---

<div class="post-metadata">

**Author:** ![jack\_Schlein](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/jack_schlein/32/7058_2.png) [@jack\_Schlein](https://discuss.kubernetes.io/u/jack_Schlein)\
**Post date:** [February 25, 2021, 1:43pm UTC](https://discuss.kubernetes.io/t/java-client-and-custom-resources/10920/2 "2021-02-25T13:43:16Z")

</div>

Hey Franck,  
Did you ever find a solution?  
I need to find a solution/documentation/examples on how to use the kubernetes-java-client with CRD/s created from Fluxcd.

What I want to do seems simple enough, basically I want to do the same thing helm install command does, but via java(cant just put a wrapper around kubectl either). I have found example/tutorials for this using Fabric8 Kubernetes Client, but the powers that be say I must use the kubernetes-java-client.

Any help is appreciated.

Thanx,  
-Max
