# Kubectl commands can't execute when proxy is configured

**URL:** <https://discuss.kubernetes.io/t/kubectl-commands-cant-execute-when-proxy-is-configured/18201>\
**Category:** General Discussions\
**Created:** [November 23, 2021, 6:04pm UTC](https://discuss.kubernetes.io/t/kubectl-commands-cant-execute-when-proxy-is-configured/18201 "2021-11-23T18:04:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![theDudeAbides42](https://sea2.discourse-cdn.com/flex016/user_avatar/discuss.kubernetes.io/thedudeabides42/32/9003_2.png) [@theDudeAbides42](https://discuss.kubernetes.io/u/theDudeAbides42)\
**Post date:** [November 23, 2021, 6:04pm UTC](https://discuss.kubernetes.io/t/kubectl-commands-cant-execute-when-proxy-is-configured/18201/1 "2021-11-23T18:04:40Z")

</div>

Hi,

I’m setting up a lab for myself to study and I’m trying to bring up a 3 node cluster running on Ubuntu 20.04 VM’s in private network.  
Do be patient with me as I’m still learning 🙂 Hopefully I can provide all the needed data to diagnose the issue.

At first, I had my cluster up but 3 nodes were in NotReady state as I did not have any CNI plugin running.

# kubectl get nodes

NAME STATUS ROLES AGE VERSION  
master-node NotReady control-plane,master 2m17s v1.22.4  
worker-node-1 NotReady 100s v1.22.4  
worker-node-2 NotReady 97s v1.22.4

Conditions:  
Type Status LastHeartbeatTime LastTransitionTime Reason Message

* * *

MemoryPressure False Tue, 23 Nov 2021 16:13:31 +0100 Tue, 23 Nov 2021 16:08:25 +0100 KubeletHasSufficientMemory kubelet has sufficient memory available  
DiskPressure False Tue, 23 Nov 2021 16:13:31 +0100 Tue, 23 Nov 2021 16:08:25 +0100 KubeletHasNoDiskPressure kubelet has no disk pressure  
PIDPressure False Tue, 23 Nov 2021 16:13:31 +0100 Tue, 23 Nov 2021 16:08:25 +0100 KubeletHasSufficientPID kubelet has sufficient PID available  
Ready False Tue, 23 Nov 2021 16:13:31 +0100 Tue, 23 Nov 2021 16:08:25 +0100 KubeletNotReady container runtime network not ready: NetworkReady=false reason:NetworkPluginNotReady message:docker: network plugin is not ready: cni config uninitialized

In order to pull docker images for CNI I had to configure proxy and I did 🙂

env | grep -i http

https\_proxy=[proxy.xyx.yyyy.com:8080](http://proxy.xyx.yyyy.com:8080)

I confirmed now I have external reachability however my kubectl just keeps running and finally it times out after quite a bit of time.

I first thought of restarting deamon and reset of kubelet + docker but it didn’t help.  
The moment I unset the proxy variable, all works well.

I’m just worried if perhaps the CIDR I used for pod creation is perhaps used in the rest of the network  
(I used 10.244.0.0/16)  
However proxy should just be used for external connections therefore I"m not sure this would apply.

Any ideas?

Kubernetes version:  
kubectl version

Client Version: version.Info{Major:“1”, Minor:“22”, GitVersion:“v1.22.4”, GitCommit:“b695d79d4f967c403a96986f1750a35eb75e75f1”, GitTreeState:“clean”, BuildDate:“2021-11-17T15:48:33Z”, GoVersion:“go1.16.10”, Compiler:“gc”, Platform:“linux/amd64”}

Server Version: version.Info{Major:“1”, Minor:“22”, GitVersion:“v1.22.4”, GitCommit:“b695d79d4f967c403a96986f1750a35eb75e75f1”, GitTreeState:“clean”, BuildDate:“2021-11-17T15:42:41Z”, GoVersion:“go1.16.10”, Compiler:“gc”, Platform:“linux/amd64”}

Cloud being used: VM in private network  
Installation method:kubeadm  
Host OS:

cat /etc/os-release

NAME=“Ubuntu”

VERSION=“20.04.2 LTS (Focal Fossa)”

ID=ubuntu

ID\_LIKE=debian

PRETTY\_NAME=“Ubuntu 20.04.2 LTS”

VERSION\_ID=“20.04”

HOME\_URL=“[https://www.ubuntu.com/](https://www.ubuntu.com/)”

SUPPORT\_URL=“[https://help.ubuntu.com/](https://help.ubuntu.com/)”

BUG\_REPORT\_URL=“[Bugs : Ubuntu](https://bugs.launchpad.net/ubuntu/)”

PRIVACY\_POLICY\_URL=“[https://www.ubuntu.com/legal/terms-and-policies/privacy-policy](https://www.ubuntu.com/legal/terms-and-policies/privacy-policy)”

VERSION\_CODENAME=focal

UBUNTU\_CODENAME=focal
