txn2 / kubefwd

Bulk port forwarding Kubernetes services for local development.
https://imti.co/kubernetes-port-forwarding/
Apache License 2.0
3.77k stars 205 forks source link

kubefwd cant save changings in hosts file #268

Open pavasilev opened 10 months ago

pavasilev commented 10 months ago

Hello,thank you for the tool, but i can't use it on Windows 10. I am currently using version 1.22.5 and I face the following issue: When i am trying to port forward, system tells me that i dont have access to saving changings in the hosts file. I checked all acceses and even give special access to file hosts in properties, but system continue to show this message.

INFO[08:56:31] Version 1.22.5
INFO[08:56:31] https://github.com/txn2/kubefwd
INFO[08:56:31]
INFO[08:56:31] Press [Ctrl-C] to stop forwarding.
INFO[08:56:31] 'cat /etc/hosts' to see all host entries.
INFO[08:56:31] Loaded hosts file C:\Windows\System32\Drivers\etc\hosts
INFO[08:56:31] HostFile management: Original hosts backup already exists at C:\Users\pvasilev/hosts.original
INFO[08:56:31] Successfully connected context: default-system
INFO[08:56:31] Port-Forward:       127.1.27.1 license-central:8080 to pod license-central-84487997fb-2pk4w:17103
INFO[08:56:31] Port-Forward:       127.1.27.2 control-provider-central:8080 to pod control-provider-central-cd7555757-945xq:30009
ERRO[08:56:31] Error saving hosts fileopen C:\Windows\System32\Drivers\etc\hosts: Access is denied.
ERRO[08:56:31] Error saving hosts fileopen C:\Windows\System32\Drivers\etc\hosts: Access is denied.
DenKn commented 9 months ago

The same problem...

roi007leaf commented 8 months ago

same..

SomeAkk commented 7 months ago

@cjimti is any news? maybe need to assign "bug" lable fow that? got same problem in win10 :c

cjimti commented 7 months ago

Do any Windows developers want to submit a PR? I don't have easy access to a Windows machine at the moment. It has been working on Windows 10 for years, so something must have changed on the Windows OS.