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.

    1. {
    2. "id": "/simplepod",
    3. "scaling": { "kind": "fixed", "instances": 1 },
    4. "containers": [
    5. {
    6. "name": "sleep1",
    7. "exec": { "command": { "shell": "sleep 1000" } },
    8. "resources": { "cpus": 0.1, "mem": 32 }
    9. }
    10. ],
    11. "networks": [ {"mode": "host"} ]
    12. }

    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:

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

    1. 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