How to set the proxy environment variables for minikube / kubectl on Windows 10? - environment-variables

I am new to kubernetes and I'm currently running minikube for learning purpose using Virtual Box on Windows 10 pro. Problem is that whenever I start my minikube using "minikube start" it runs in the VM and works fine for a few minutes. But after executing a few commands it says "TLS handshake timeout"....I searched on the web and it seems that some environment variable needs to be configured which I couldn't figure out..
It would be very helpful if anyone can give me a way to solve this. Thanks in advance.
I tried the following commands from kubernetes.io
type here
```set HTTP_PROXY=http://<proxy hostname:port>
set HTTPS_PROXY=https://<proxy hostname:port>
set NO_PROXY=localhost,127.0.0.1,10.96.0.0/12,192.168.59.0/24,192.168.49.0/24,192.168.39.0/24
minikube start
I hoped that it would fix the problem of TLS handshake lost, but the problem persisted.

Related

java.lang.IllegalStateException: Could not connect to Ryuk at localhost:49167

I am using test containers library to launch a container. It worked for a while but currently running into this
java.lang.IllegalStateException: Could not connect to Ryuk at localhost:49167
at org.testcontainers.utility.ResourceReaper.start(ResourceReaper.java:201)
at org.testcontainers.DockerClientFactory.client(DockerClientFactory.java:205)
at org.testcontainers.LazyDockerClient.getDockerClient(LazyDockerClient.java:14)
at org.testcontainers.LazyDockerClient.authConfig(LazyDockerClient.java:12)
at org.testcontainers.containers.GenericContainer.start(GenericContainer.java:310)
I looked at the resource reaper code and it seems like it is failing here
public synchronized void performCleanup() {
this.registeredContainers.forEach(this::stopContainer);
this.registeredNetworks.forEach(this::removeNetwork); //FAILS HERE
this.registeredImages.forEach(this::removeImage);
}
I can confirm that this is resolved by updating testcontainers to 1.16.0 version
Was facing the same exception with testcontainers 1.15.3
Windows 10, Docker desktop 4.0.0
I tried everything mentioned here but nothing worked.
if anyone is still facing the issue they can give this one a try...this worked for me
this works for windows
open you power shell in administrator mode.
run "net stop winnat"
run "net start winnat"
doing this resolved this issue on my setup. hope this helps someone
I ran into the same issue. Same Docker-for-Mac version.
Solution for me was to disable "Use gRPC FUSE for file sharing" in Preferences:
For me, restarting the local docker engine solved the problem
I'm on a Windows 11 machine with the same issue:
It turned out that a vast number of ports were allocated by the service "IP helper" (relates to ipv6 support), i.e. ports prior allocated by testcontainers, or other services. They were allocated for weeks by Ip helper but never, or rarely, released. By permanently disabling service Ip helper all issues were resolved and the set-up works great since then without any observed side effects that I am in need of.
Setting: Windows11 + Rancher Desktop
Restarting Rancher Desktop did not help. However, restarting my computer did the job.

Docker and Windows - A connection attempt failed because the connected party did not properly respond after a period of time

I installed the docker toolbox but when i try to create a container it gives me that error.
The version is returned but it's not possible to create a container.
OS: Windows 10 Home
ERROR: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond.
I had the same problem with Docker Desktop (Year 2021).
None of the solutions worked. Finally I tried the following and it worked.
Remove the following environment variable from windows
DOCKER_HOST
In docker desktop settings enable the following option
Expose daemon on tcp://localhost:2375 without TLS
Other resources suggested to deinstall and install docker for windows or the toolbox again, or said you couldn't run both at the same time. But that was not the problem for me. Turns out I just needed to update VirtualBox 6.0 to 6.1.
TLDR;
Is your docker vm even running? Are you using a troublesome VirtualBox version? Update!

Issue when trying to start minikube with virtualbox?

I'm using the new version of MacOs Catalina, i just installed Docker, Minikube and Virtualbox. All these from Homebrew. When i try to start minikube start, i get following error:
😄 minikube v1.9.2 on Darwin 10.15.4
✨ Using the virtualbox driver based on user configuration
👍 Starting control plane node m01 in cluster minikube
🔥 Creating virtualbox VM (CPUs=2, Memory=6000MB, Disk=20000MB) ...
❗ This VM is having trouble accessing https://k8s.gcr.io
💡 To pull new external images, you may need to configure a proxy:
https://minikube.sigs.k8s.io/docs/reference/networking/proxy/
💣 Failed to enable container runtime: enable docker.: NewSession: write tcp
127.0.0.1:50207->127.0.0.1:50185: write: broken pipe
😿 minikube is exiting due to an error. If the above message is not useful, open an issue:
👉 https://github.com/kubernetes/minikube/issues/new/choose
With hyperkit-vm its working fine, but not with virtualbox?
Anyone know why I am getting this problem? I did not get this error for few days ago, suddenly i get this now?
Thank for the help!
I think there might a a bug from minikube. There is some related issue to this one on their GitHub site.
https://github.com/kubernetes/minikube/issues/7616
https://github.com/kubernetes/minikube/issues/7465
Hopefully they will fix this bug soon as possible.

Running Docker locally in browser on Windows10: Error - IP Not Found

Ok, so here's my background first. I'm a noob in the world of commandline interfaces, but have been building websites off and on for a long time (10 yrs) using GUI's. So, I'm trying to make the switch to CLI's while also learning Docker.
Right now I'm stuck at trying to get Docker to load anything into my browser window. Here's what I've done successfully:
Installed Docker CE on my Windows 10 Machine
Setup a new virtual switch in Hyper-V Manager per these instructions and restarted the computer.
Created a new machine using this line of code docker-machine create -d hyperv --hyperv-virtual-switch "Primary Virtual Switch" manager1
Now here's where things get a little interesting. When I run the above function (I've done it twice now) it stalls on the line: Waiting for host to start...
I waited for five minutes to see if it would do anything, before killing the operation. (oh, did I mention I'm running PowerShell in Adminstrator Mode - right click on the icon to "run as administrator").
So when I re-open PowerShell to check if the new "manager1" machine has been created it comes back affirmative, but with this:
PS C:\WINDOWS\system32> docker-machine ls
NAME ACTIVE DRIVER STATE URL SWARM DOCKER ERRORS
manager1 * hyperv Running Unknown IP not found
As far as I can tell these are the steps that I need to take to get Docker to run locally in my browser window, but for the life of me, I'm lost!
Oh, I did downgrade my docker-machine version per a suggestion that I read in a git forum comment, but that was to remedy an issue with the docker-machine create command. Part of me wonders if I'm doing too much. But I honestly don't know what to do next.
UPDATE:
I don't know that this is progress, but in the Virtual Switch Manager, I did switch the external network device from the "Ethernet Connection" to the "Dual Band Wireless" option. Then I restarted my machine. Now I'm showing that the state of the machine is "Timeout". I've also started and stopped my "docker-machine manager1". It sites on the (manager1) Waiting for host to start... line for about half a minute, then proceed to the Waiting for SSH to be available... where it just sits. Here's another screen shot that captures this:
Ok, my confusion was a result of looking beyond the documentation and getting a little confused. I still don't have this fully figured out but everything I was attempting to accomplish is detailed in this getting started with Windows 10 pro article.

Docker Toolbox and Terminal error

I'm brand new to Docker and to containers or anything ops related at all, and am playing with this tool in order to start learning. Mostly I work with Django and Frontend, so please help me understand any answer posted. Thanks.
I installed the Docker Toolbox on my Mac (OS X) and am getting what seems to be a very common error in my terminal after I quickstart it from the Launchpad:
Error getting IP address: Something went wrong running an SSH command!
command : ip addr show
err : exit status 255
output :
docker is configured to use the default machine with IP
For help getting started, check out the docs at https://docs.docker.com
I tried running docker-machine ip and got an error which said:
Error getting IP address: Something went wrong running an SSH command!
I've seen some broad explanations for how to fixing this, but steps and some explanation would be very helpful. Thanks.
Docker, as it turns out, has fantastic customer service. They had me reinstall the toolkit, and then retry all the steps. The first time I quickstarted the terminal, I got a time out, but it worked fine the second time. Slow wifi may have been the problem initially.

Resources