Skip to content

Instantly share code, notes, and snippets.

@AmitDJagtap
Created October 29, 2018 06:24
Show Gist options
  • Select an option

  • Save AmitDJagtap/ef442a28aa55a70b6c77a97aa8e2e2af to your computer and use it in GitHub Desktop.

Select an option

Save AmitDJagtap/ef442a28aa55a70b6c77a97aa8e2e2af to your computer and use it in GitHub Desktop.
curl -k -u "${RANCHER_ACCESS_KEY}:${RANCHER_SECRET_KEY}" \
-X PUT \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d '{ "containers": [{ "image": "'${IMAGE}'", "name": "'${NAME}'" }], "imagePullSecrets": [{ "name": "'${REGISTRY_SECRET}'", "type": "/v3/project/schemas/localObjectReference" }], "name": "'${NAME}'", "namespaceId": "'${NAMESPACE}'", "projectId": "'${PROJECT_ID}'", "scale": "'${SCALE}'", "workloadLabels": { "workload.user.cattle.io/workloadselector": "'${WORKLOAD_SELCTER}'" } }' \
'https://my-rancher-server-url/v3/project/'${PROJECT_ID}'/workloads/deployment:'${NAMESPACE}':'${NAME}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment