Reputation: 572
These days I've been working with kubernetes and kubectl at work, the point is that each time I open a console I have to write:
export http_proxy=http://<username>:<pass>@<proxy>:8080 for unix OS
set http_proxy=http://<username>:<pass>@<proxy>:8080 for windows OS
because my Pc is behind a coorporative proxy. This is very anoying because i have to write it a lot of time every days.
Is there any way to configure kubectl proxy with a config file or something else?
Upvotes: 1
Views: 1902
Reputation: 43
I had this problem some months ago.
What I did to fix this was to start to use iTerm2 (I'm using Mac) and set PROFILES.
You can have 1 profile to work from office and another to work from home, then you can set some commands when you enter the profile: you can set proxies, ssh login.. whatever =)
Hope it helps.
Upvotes: 1
Reputation: 220
One option is to add the export line to your .bashrc (or equivalent if you're using another shell) as this is sourced every time you open up a new terminal.
Upvotes: 3