I’m running mongodb operator on kubernetes, using externalConnectivity to get a service with external IP for ops manager.
I want to get my organization ID without using the GUI.
I found this but when curling the thing curl responds nothing, get stuck
curl --user '$(kubectl get secrets mongodb-ops-manager-admin-key -o jsonpath="{.data.publicKey}:{.data.privateKey}")' --digest \
--header 'Accept: application/json' \
--include \
--request GET "http://35.xxx.xxx.xxx/api/public/v1.0/orgs/"
The secret is encode in base64 in k8s, so I have to decode it
and use port 8080
PRIVATE_KEY=$(kubectl get secrets mongodb-ops-manager-admin-key -o jsonpath="{.data.privateKey}" | base64 --decode)
PUBLIC_KEY=$(kubectl get secrets mongodb-ops-manager-admin-key -o jsonpath="{.data.publicKey}" | base64 --decode)
curl --user "$PUBLIC_KEY:PRIVATE_KEY" --digest \
--header 'Accept: application/json' \
--include \
--request GET "http://35.xxx.xxx.xxx:8080/api/public/v1.0/orgs/"
1 Like
system
(system)
Closed
3
This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.