How to transform kubernetes YAML file into DC/OS JSON

10/15/2019

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?

-- strangedeveloper
dcos
kubernetes
marathon

2 Answers

10/15/2019

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
-- P Ekambaram
Source: StackOverflow

10/15/2019

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.

-- Amit Kumar Gupta
Source: StackOverflow