Welcome to Microsoft Q&A Platform, thanks for posting your query here.
Firstly, apologies for the delay in responding and to hear about your experience regarding this issue. I checked with internal team on this.
The arguments –proxy-https
, --proxy-http
are not for setting the proxy environmental variables for AZ CLI. They are for setting the env variables in the azure arc agents in your Kubernetes cluster if your cluster is behind an outbound proxy. They are not for setting the env variables on the machine where you are running the az cli (when the machine also is behind a proxy).
In this document, Under AZure CLI point #1 is for setting Azure CLI behind proxy, point #2 is for sending the proxy server details to the connect command to set those env variables on the arc agents in the cluster. (feedback has been provided to document author to add these details to the document to avoid confusion). Please check the Note section in the document as it mentions about passing –proxy-skip-range
as well which you would need in case your Kubernetes cluster is behind proxy as well.
Regarding the “az connectedk8s enable-features“, same as explained above applies here. –proxy-https
and –proxy-http
are for the agents in the k8s cluster and not for the AZ CLI command itself. Incase your cluster is behind a proxy, you can either send the parameters while onboarding as mentioned in #2 in here.
You can also update your existing cluster by running below command:
az connectedk8s update -g <rg> -n <clustername> --proxy-http <url> --proxy-http <url> --proxy-skip-range <cidr range>
After this you can run the az connectedk8s enable-features to enable and disable features.
Coming to running the az cli command behind a proxy which I believe is the main error that you are facing here, for running any az cli command (for e.g az connectedk8s connect) on a machine that is behind an outbound proxy, you need to set the following variables HTTPS_PROXY
, HTTP_PROXY.
Incase your proxy is doing cert authentication you can follow the steps here.
In the issue details you shared, I can see that you have set HTTS_PROXY instead of HTTPS_PROXY
.
Could you set the appropriate values and try the command again?
Try and let me know if you need any help on this.
Hope that helps.
Please 'Accept as answer' if the provided information is helpful, so that it can help others in the community looking for help on similar topics.