[solved] Error installing istio using istioctl

Hi all,
I’m trying to install istio using istioctl but I receive various errors stating that istioctl

sysop@hoseplak3s:~/software/istio-1.4.3$ sudo istioctl manifest apply --set profile=demo
- Applying manifest for component Base...
Failed to wait for resources ready: Get http://localhost:8080/api/v1/namespaces/istio-system: dial tcp [::1]:8080: connect: connection refused
- Applying manifest for component Galley...
- Applying manifest for component Policy...

Seems that istioctl is looking for the kubernetes apiserver on localhost:8080 but in my installation (I’m using k3s) kubernetes service responds at 10.43.0.1:443

If I use kubectl proxy the address is 127.0.0.1:8001

What I’m doing wrong?

Replying to myself.

For the root user there was a missing file “/root/.kube/config”

Using a k3s installation the step to create the missing file are:

sudo cp /etc/rancher/k3s/k3s.yaml .
sudo sed -i 's:localhost:hoseplak3s:;s:default:TheNameOfYourHost:g' k3s.yaml
sudo KUBECONFIG=~/.kube/config:k3s.yaml kubectl config view --raw > config.tmp
sudo mv config.tmp /root/.kube/config
sudo istioctl manifest apply --set profile=demo

Change TheNameOfYourHost with the output of the hostname command

Thanks a lot… it works for non root user as well.

I am also facing same problem but above resolution does not work for me. Is there any prerequisite before installing istio, currently i just downloaded , added the PATH variable and run the install command which fail with
sankalp@DESKTOP:~/istio-1.10.1$ istioctl install --set profile=demo -y
Error: Get “http://localhost:8080/api?timeout=32s”: dial tcp 127.0.0.1:8080: connect: connection refused

Well, for the latest istio install I’m using the “istio operator” installation method.

See https://istio.io/latest/docs/setup/install/operator/

I don’t know how istioctl install works now

Had this problem with a k3s cluster, simply setting up KUBECONFIG helped:
export KUBECONFIG=/etc/rancher/k3s/k3s.yaml
istioctl install …

1 Like

I had the similar issue. I was using microk8s.
Appending microk8s before istioctl install --set profile=demo -y worked for me.

This was final command

microk8s istioctl install --set profile=demo -y

This is exactly my issue, perhaps I missed this step during k3s setup. Thank you!