Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
LOGIN_CONFIG=$1
K8S_UUID=$2
source $LOGIN_CONFIG
COOKIE=$(curl -k -s -D - \
-X POST \
-H "Content-Type: application/json" \
-u "$PRISM_USER:$PRISM_PASS" \
-d "{}" \
--url "https://$PC_ADDR:9440/api/nutanix/v3/clusters/list" | grep Set-Cookie: | sed "s/^Set-//" | sed "s/\;.*//")
eval curl -k -s \
-X DELETE \
-H \"Content-Type: application/json\" \
-H \"$COOKIE\" \
--url "https://$PC_ADDR:9440/karbon/acs/k8s/cluster/$K8S_UUID"
@gowatana

This comment has been minimized.

Copy link
Owner Author

@gowatana gowatana commented Dec 12, 2020

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment