How to transform kubernetes YAML file into DC/OS JSON

226 Views Asked by At

I have to deploy a Kubernetes YAML file to DC/OS marathon. I haven't found how to transform Kubernetes YAML into JSON used on DC/OS, especially since there are YAMLs of various kinds, for example: DaemonSet, Service, PersistentVolume, StatefulSet, etc.

Is there an easy way to transform Kubernetes YAML files into JSON used on DC/OS?

2

There are 2 best solutions below

0
Amit Kumar Gupta On BEST ANSWER

No. Kubernetes and Marathon are two totally different systems. There is not a straightforward way to transform all the kinds of resources and their configurations from Kubernetes to Marathon.

0
P Ekambaram On

deploy the yaml file in kubernetes sandbox environment. You can use https://www.katacoda.com/courses/kubernetes/playground to deploy YAML files. Tthen using the below command you can get json

kubectl get deploy <deployment-name> -ojson