kubectl apply -f <spec.yaml> equivalent in fabric8 java api
You don't need to specify resource type whenever loading a file with multiple documents. You simply need to do:
// Load Yaml into Kubernetes resources List<HasMetadata> result = client.load(new FileInputStream(args[0])).get(); // Apply Kubernetes Resources client.resourceList(result).inNamespace(namespace).createOrReplace()