GoogleCloudPlatform/anthos-service-mesh-packages

install_asm fails without any info when unable to connect to kubernetes api

damadei-google opened this issue · 1 comments

When install_asm is unable to talk to K8S master probably due to firewall like master authorized networks, no info is provided and the script simply aborts

If we run it in verbose mode, we get the following:

2021-08-30T19:58:23.654677 install_asm: -------------
2021-08-30T19:58:24.512720 install_asm: Running: '/usr/bin/kubectl --kubeconfig asm_kubeconfig version -o json'
2021-08-30T19:58:24.538245 install_asm: -------------
Unable to connect to the server: dial tcp XX.XX.XXX.XXX:443: i/o timeout

Suggestion here is to output the errors from kubectl even when not in verbose mode so users can understand what is happening and probably configure firewall for the master or run it from proper network

I had the same issue in my local machine.
Then I tried with cloud shell with asmcli..

  1. enter the cloud shell
  2. get public ip address of cloud shell node by curl ifconfig.co
  3. temporarily add ip of cloud shell instance into master authorized network of the cluster.
    image
  4. run asmcli install ... --verbose, follow direction of: https://cloud.google.com/service-mesh/docs/unified-install/install

it worked!