Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

get kubeSphere version failed during upgrade #2280

Open
automagics opened this issue Jun 7, 2024 · 0 comments
Open

get kubeSphere version failed during upgrade #2280

automagics opened this issue Jun 7, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@automagics
Copy link

What is version of KubeKey has the issue?

v3.0.13

What is your os environment?

Ubuntu 22.04

KubeKey config file

No response

A clear and concise description of what happend.

When I try to upgrade Kubernetes and KubeSphere using KubeKey, the following error is returned:

get kubeSphere version failed: Failed to exec command: sudo -E /bin/bash -c "/usr/local/bin/kubectl get deploy -n kubesphere-system ks-console -o jsonpath='{.metadata.labels.version}'"
error: You must be logged in to the server (Unauthorized): Process exited with status 1

When I run sudo -E /bin/bash -c "/usr/local/bin/kubectl get deploy -n kubesphere-system ks-console -o jsonpath='{.metadata.labels.version}'" myself, the version number is returned correctly.

Relevant log output

13:17:44 CEST [ClusterPreCheckModule] Check KubeSphere version
13:17:44 CEST message: [k8smaster01]
get kubeSphere version failed: Failed to exec command: sudo -E /bin/bash -c "/usr/local/bin/kubectl get deploy -n  kubesphere-system ks-console -o jsonpath='{.metadata.labels.version}'"
error: You must be logged in to the server (Unauthorized): Process exited with status 1
13:17:44 CEST retry: [k8smaster01]
13:17:49 CEST message: [k8smaster01]
get kubeSphere version failed: Failed to exec command: sudo -E /bin/bash -c "/usr/local/bin/kubectl get deploy -n  kubesphere-system ks-console -o jsonpath='{.metadata.labels.version}'"
error: You must be logged in to the server (Unauthorized): Process exited with status 1
13:17:49 CEST retry: [k8smaster01]
13:17:54 CEST message: [k8smaster01]
get kubeSphere version failed: Failed to exec command: sudo -E /bin/bash -c "/usr/local/bin/kubectl get deploy -n  kubesphere-system ks-console -o jsonpath='{.metadata.labels.version}'"
error: You must be logged in to the server (Unauthorized): Process exited with status 1
13:17:54 CEST failed: [k8smaster01]
error: Pipeline[UpgradeClusterPipeline] execute failed: Module[ClusterPreCheckModule] exec failed:
failed: [k8smaster01] [KsVersionCheck] exec failed after 3 retries: get kubeSphere version failed: Failed to exec command: sudo -E /bin/bash -c "/usr/local/bin/kubectl get deploy -n  kubesphere-system ks-console -o jsonpath='{.metadata.labels.version}'"
error: You must be logged in to the server (Unauthorized): Process exited with status 1

Additional information

No response

@automagics automagics added the bug Something isn't working label Jun 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant