Skip to content

istioctl install doesn't return a clear error message when it's unable to connect to kubernetes cluster #33402

@jonathan-innis

Description

@jonathan-innis

(NOTE: This is used to report product bugs:
To report a security vulnerability, please visit https://istio.io/about/security-vulnerabilities
To ask questions about how to use Istio, please visit https://discuss.istio.io)

Bug description

istioctl install returns a generic error when it fails to install which makes it hard to understand whether it is unable to download the configurations from the configuration server or whether it is unable to connect to the k8s cluster

jonathaninnis@DESKTOP-PMUFP6M:~$ istioctl install
Error: an error on the server ("unknown") has prevented the request from succeeding

[ ] Docs
[ X ] Installation
[ ] Networking
[ ] Performance and Scalability
[ ] Extensions and Telemetry
[ ] Security
[ ] Test and Release
[ ] User Experience
[ ] Developer Infrastructure
[ ] Upgrade

Expected behavior

If istioctl install is unable to reach the kubernetes cluster it should specify that with the error. i.e.

Error: unable to connect to the kubernetes cluster failed with ("unknown")

Steps to reproduce the bug

Create a kubecontext to point to a Kubernetes cluster that is unable to be reached

Attempt to install using istioctl install

Version (include the output of istioctl version --remote and kubectl version --short and helm version --short if you used Helm)

jonathaninnis@DESKTOP-PMUFP6M:~$ istioctl version --remote
client version: 1.10.1
control plane version: 1.10.1
data plane version: 1.10.1 (2 proxies)
jonathaninnis@DESKTOP-PMUFP6M:~$ kubectl version --short
Client Version: v1.19.7
Server Version: v1.21.1

How was Istio installed?

Istio failed installation 😃

Environment where the bug was observed (cloud vendor, OS, etc)

Local Environment (kind cluster)

Additionally, please consider running istioctl bug-report and attach the generated cluster-state tarball to this issue.
Refer cluster state archive for more details.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions