Quick Start

Launching a pod from the CLI or UI

Prerequisites

Launching a pod from the DC/OS CLI

  1. Create a JSON application definition with contents similar to this example. In this example, we will call the file simple-pod.json.

    {
        "id": "/simplepod",
        "scaling": { "kind": "fixed", "instances": 1 },
        "containers": [
            {
                "name": "sleep1",
                "exec": { "command": { "shell": "sleep 1000" } },
                "resources": { "cpus": 0.1, "mem": 32 }
            }
        ],
        "networks": [ {"mode": "host"} ]
    }
    

    NOTE: The pod ID (the id parameter in the pod specification above) is used for all interaction with the pod once it is created.

  2. Launch the pod on DC/OS with the following DC/OS CLI command:

    dcos marathon pod add simple-pod.json
    
  3. Verify the status of your pod.

    dcos marathon pod show simplepod
    

Launching a pod from the DC/OS UI

You can also launch a pod from the Services tab of the DC/OS web interface. Select Services -> Services -> RUN A SERVICE -> Multi-container (Pod), then toggle to JSON mode and paste in the application definition supplied above.

If you already have other services running, go to Services -> Services, then click the + on the upper right hand side.

After you launch your pod, you’ll see your new pod on the Services tab of the DC/OS UI. Click the pod to see information about the status of the containers in your pod.

Pods UI

Figure 1. Services > Pods