Created
December 12, 2020 13:44
-
-
Save gowatana/6464d3069687e33cffb301369acdbfa7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
下記の投稿むけ。
https://blog.ntnx.jp/entry/2020/12/12/231247