Closed larslevie closed 6 years ago
@mboersma do you know how upgrade/create sets SSH key? In this case SSH key was located at ~/.ssh/labstack_rsa.pub
during create
@larslevie to confirm the SSH key at ~/.ssh/labstack_rsa.pub
did not change between when create was issue and when upgrade was issued?
That's correct, that key was created before the steps described above, and has not changed.
I just created and upgraded a test cluster successfully by allowing Azure to generate the SSH keys for me.
>> az aks create -n am26-labstack -g am26-kube --generate-ssh-keys
Location Name ResourceGroup
---------- ------------- ---------------
centralus am26-labstack am26-kube
az aks get-versions -n am26-labstack -g am26-kube
Name ResourceGroup MasterVersion MasterUpgrades NodePoolVersion NodePoolUpgrades
------- --------------- --------------- ------------------- ----------------- -------------------
default am26-kube 1.7.7 1.8.2, 1.7.9, 1.8.1 1.7.7 1.8.2, 1.7.9, 1.8.1
az aks upgrade -n am26-labstack -g am26-kube -k 1.8.2
Kubernetes may be unavailable during cluster upgrades.
Are you sure you want to perform this operation? (y/n): y
Location Name ResourceGroup
---------- ------------- ---------------
centralus am26-labstack am26-kube
@amanohar the CLI GETs the managed cluster's JSON representation, modifies the kubernetes_version
field, and PUTs it back to the server for az aks upgrade
. So it seems unlikely the SSH keyData field could be changed by the CLI itself after the initial az aks create
.
I haven't been able to reproduce this by following similar steps (but in the eastus region):
$ az --version | head -n 1
azure-cli (2.0.22)
$ az group create -l eastus -n maboersm
$ az aks create -g maboersm -n maboersm02 --ssh-key-value=~/.ssh/id_sprout_rsa.pub
$ az aks upgrade -g maboersm -n maboersm02 -k 1.8.2 # --debug
$ az aks scale -g maboersm -n maboersm02 -c 5
No errors, cluster looks good. @larslevie are you using the current 2.0.22 az
CLI, and is this still reproducible for you?
Yes, I can still reproduce if I bring my own SSH key. I'm running azure-cli 2.0.21
, which it looks like is the latest stable release.
@larslevie I've tried to reproduce this several times now, using the 2.0.21 CLI explicitly and various RSA keys I had and ones I generated (with and without passwords), but I can't make this error happen.
If anyone has seen this or has an idea how to reproduce it, please let me know.
Going to close this issue out, please open a new issue if you continue to have problems.
When trying to
az upgrade
oraz scale
a AKS cluster I just created from scratch, I get the following error:Operation failed with status: 'Bad Request'. Details: Changing property 'linuxProfile.ssh.publicKeys.keyData' is not allowed.
Steps to reproduce:
Create new cluster
Check cluster version: