Skip to content

Instantly share code, notes, and snippets.

@behroozam
Created September 12, 2018 11:46
Show Gist options
  • Save behroozam/ade5c4288059f5305df7537e0dae2d50 to your computer and use it in GitHub Desktop.
Save behroozam/ade5c4288059f5305df7537e0dae2d50 to your computer and use it in GitHub Desktop.
rancher v2 kubernetes create or update a service example api with curl
curl -k -X PUT \
-u "user-token:password" \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
-d "{\"containers\":[{\"allowPrivilegeEscalation\":false,\"image\":\"YourImage\",\"imagePullPolicy\":\"Always\",\"initContainer\":false,\"name\":\"bisthijdah-webserver\"}]}" \
"yourbaseURL/v3/project/yourprojectid/workloads/deployment:namespace:yourappname"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment