How to create a ClusterRoleBinding from a java program?

Multi tool use
Multi tool use


How to create a ClusterRoleBinding from a java program?



I am using io.fabric8:kubernetes-client:3.2.0. Is there another way?
It would be of great help for my use case?


apiVersion: rbac.authorization.k8s.io/v1beta1
kind: ClusterRoleBinding
metadata:
labels:
app: horovod-1
name: horovod-1
roleRef:
apiGroup: rbac.authorization.k8s.io
kind: ClusterRole
name: view
subjects:
- kind: ServiceAccount
name: horovod-1
namespace: kubeflow



I am creating using client.load() method.
It's giving null pointer exception.



When i checked, there is ClusterRoleBinding model. But, there is no handler for CLusterRoleBinding.





Is your current approach working? What is the problem?
– f1sh
Jul 2 at 9:49





@f1sh it's giving null pointer exception. I am creating using client.load(bais).inNamespace( namespace).createOrReplace();
– Abhishek Tiwari
Jul 2 at 9:50






then find out why the exception is thrown
– f1sh
Jul 2 at 11:23





Is there another way? I would highly recommend using the official Java client rather than some random library from a 3rd party
– Matthew L Daniel
Jul 3 at 3:08









By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

A lOWfHDU erbS8L5Ea0SbimfTdn JJf2,unXBmLa0Mrfgu e rIu9TrBJuF djH,HSfY5,Fgrx,o2mi,iYXXvxcC
ms Uamo

Popular posts from this blog

PHP contact form sending but not receiving emails

Do graphics cards have individual ID by which single devices can be distinguished?

Create weekly swift ios local notifications