简体   繁体   中英

Getting error while SSH to VM of Azure Kubernetes

Below is my version of azure-cli

az --version 

azure-cli 2.0.75 *

command-modules-nspkg 2.0.3
core 2.0.75 *
nspkg 3.0.4
telemetry 1.0.4

Python location '/usr/local/Cellar/azure-cli/2.0.75/libexec/bin/python'
Extensions directory '/Users/alexchun/.azure/cliextensions'

Python (Darwin) 3.7.4 (default, Oct 12 2019, 18:55:28) [Clang 11.0.0 (clang-1100.0.33.8)]

Legal docs and information: aka.ms/AzureCliLegal

I tried to follow this link but there is no vmss found. Then I tried to run az aks nodepool list --resource-group myResourceGroup --cluster-name myAKSCluster to double check whether I could find vmss information or not (as I enabled vmss when creating AKS) but with it required me to install aks-preview.

When I wanted to install az extension add --name aks-preview but with below error:

Unable to get extension index.
Please ensure you have network connection. Error detail: HTTPSConnectionPool(host='aka.ms', port=443): Max retries exceeded with url: /azure-cli-extension-index-v1 (Caused by SSLError(SSLError("bad handshake: Error([('SSL routines', 'ssl3_read_bytes', 'tlsv1 alert internal error')])")))

Thus, I also tried this method to SSH Azure VM directly but failed. (I tried to SSH with manual created Ubuntu VM before successfully)


Supplement: I recreated new AKS with VMSS (enable port 22) but still could not SSH to it: 在此处输入图片说明

Faced error:

ssh: connect to host 5x.1xx.1xx.2xx port 22: Operation timed out

There is no External-IP and I SSH with Internal-IP but failed: 在此处输入图片说明

For your issue, the steps in the link is no problem. When you check the VMSS with the command here:

CLUSTER_RESOURCE_GROUP=$(az aks show --resource-group myResourceGroup --name myAKSCluster --query nodeResourceGroup -o tsv)
SCALE_SET_NAME=$(az vmss list --resource-group $CLUSTER_RESOURCE_GROUP --query [0].name -o tsv)

You need to use your own resource group which the AKS cluster in. And then, if there is no information about the VMSS, it means you do not enable the VMSS when you create the AKS cluster. At this time, you just need to SSH the VMs using the means in that link.

Finally, maybe you can upgrade the Azure CLI to the newest version, then try to install the extension again.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM