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 | |
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 POST \ | |
-H \"Content-Type: application/json\" \ | |
-H \"$COOKIE\" \ | |
-d \'{}\' \ | |
--url "https://$PC_ADDR:9440/karbon/acs/k8s/cluster/list" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Nutanix Karbon の Kubernetes クラスタ情報を取得する。
使用方法
下記のようなファイルを用意。
実行。