Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
3.5k views
in Technique[技术] by (71.8m points)

azure - kubectl error: You must be logged in to the server (Unauthorized) after some time in AKS

I have a cluster with RBAC in AKS, and it works just fine, but sometimes (it seems after my laptop goes to sleep) I just get this error and have to create context again:

kubectl error: You must be logged in to the server (Unauthorized)

It does not seem to happen all the time. Sometimes many sleep cycles (few days) passes, sometimes just few hours. It seem totally random.

Would appreciate any help on figuring out why this is happening.

My set up is like that (I don't know if it is important though):

I usually work on Windows Subsystem for Linux 2, but I have the same version of kubectl on windows itself and the config files are the same between the two (I linked kubectl config from linux).

I am pretty sure though I did not use windows kubectl last time it happened, only linux version


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
等待大神答复

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...