'CustomResourceDefinition creation via yaml file in Java Kubernetes api
I'm working on a big Java project and was wondering 2 things. What would be the more elegant way of implementing the following idea :
I need to initiate a sequence of Kubernetes commands like creating and applying a few YAML files (of CustomResourceDefinition) monitoring them and changing a few things like IP addresses and reading from the spec fields of these CustomResourceDefinition later on.
I was struggling with the Java Kubernetes API when it came to CustomResourceDefinitons in the sense that I didn't see any way to add my relevant spec fields which are not k8s built (like a field that is called copyMethod: Snapshot etc ...)
So my 2 questions are :
- Is there a better more elegant way of doing this? like some sort of a Job process that could just be initiated via Java
- Is there something that reads Kubernetes YAML files and creates the resources in these YAML files?
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
