Friday, 7 January 2022

TIL: Tracing IBM Cloud CLI

For no particular reason, I've "discovered" how to trace the IBM Cloud Command Line Interface (CLI) tool, which is useful.

I'm mainly running on macOS and Linux and, in both cases, I can trace the CLI by setting the variable IBMCLOUD_TRACE to true: -

export IBMCLOUD_TRACE=true

and now I see the HTTP request and response headers: -

ic plugin list

Listing installed plug-ins...

REQUEST: [2022-01-07T12:56:22Z]

GET /ibm-cloud-cli-plugin-metadata/bluemix-repo-index.yml HTTP/1.1

Host: download.clis.cloud.ibm.com

Accept: application/json

Accept-Language: en-US

Accept-Language: en

Content-Type: application/json

User-Agent: IBM Cloud CLI 2.3.0 / darwin

RESPONSE: [2022-01-07T12:56:24Z] Elapsed: 1618ms

HTTP/1.1 200 OK

Content-Length: 666352

Accept-Ranges: bytes

Connection: keep-alive

Content-Type: binary/octet-stream

Date: Fri, 07 Jan 2022 12:56:24 GMT

Etag: "863b7cd704c756d503a86834edab6709"

Last-Modified: Thu, 06 Jan 2022 15:15:24 GMT

Server: Cleversafe

X-Amz-Request-Id: c96d5071-20db-485e-9245-4ffb4b52e66b

X-Clv-Request-Id: c96d5071-20db-485e-9245-4ffb4b52e66b

X-Clv-S3-Version: 2.5



[SKIP BINARY OCTET-STREAM CONTENT]

Plugin Name                                  Version   Status             Private endpoints supported   

container-service[kubernetes-service]        1.0.353                      false   

key-protect                                  0.6.9                        true   

logging                                      0.0.8                        false   

sdk-gen                                      0.1.12                       false   

vpc-infrastructure[infrastructure-service]   2.1.0                        true   

cloud-functions[wsk/functions/fn]            1.0.56    Update Available   false   

cloud-object-storage                         1.3.1                        false   

container-registry                           0.1.553   Update Available   true   

which is nice

And now to update my plugins: -

ic plugin update

No comments:

Note to self - use kubectl to query images in a pod or deployment

In both cases, we use JSON ... For a deployment, we can do this: - kubectl get deployment foobar --namespace snafu --output jsonpath="{...