Comments (10)
@vogxn I'm connecting over HTTPS but I have insecure-skip-tls-verify: true
set in $HOME/.kube/config
due to our use of a self signed cert for the cluster controllers at this time. This will change in the future as we have plans to put the 5 controller nodes behind a load balancer and use our "real" certificate. Until then I'm connecting directly to node1 in the cluster which has a self signed cert:
clusters:
- cluster:
insecure-skip-tls-verify: true
server: https://node1.cluster1.my-domain.com
name: cluster1.prod
I have confirmed that setting urllib3.disable_warnings()
as you did suppresses the warning.
from kube-shell.
Also get the same error with the following:
kubectl --namespace
Any time I invoke the --namespace
flag or try to perform and action on the configmap type I receive this error.
from kube-shell.
client-python library that kube-shell uses seems to be running in to some problem. @k4k Could you please share details of your enviromnent. We had an issue #26 reported with python kubernetes library when running on GKE/AWS.
Also can you please confirm if kubectl works fine?
from kube-shell.
@murali-reddy I can confirm that kubectl works fine. I've been using it now for a few months in our environment and have seen no issues. While I do have a GKE cluster configured in $HOME/.kube/config
the error above appears when I have the context for either of our on premises clusters (cluster1.stage or cluster1.prod) active. More details are provided below. If you need something not included, please let me know. I'm happy to provide whatever info is needed, I'm just not sure exactly what is and is not useful for the purposes here.
Client info:
$ kubectl config get-contexts
CURRENT NAME CLUSTER AUTHINFO NAMESPACE
cluster1.stage cluster1.stage [email protected]
gke_test-server-nnnnnn_us-xxxxx-b_example-cluster gke_test-server-nnnnnn_us-xxxxx-b_example-cluster gke_test-server-nnnnnn_us-xxxxx-b_example-cluster
minikube minikube minikube
* cluster1.prod cluster1.prod [email protected]
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.4", GitCommit:"d6f433224538d4f9ca2f7ae19b252e6fcb66a3ae", GitTreeState:"clean", BuildDate:"2017-05-19T20:41:07Z", GoVersion:"go1.8.1", Compiler:"gc", Platform:"darwin/amd64"}
Server Version: version.Info{Major:"1", Minor:"6", GitVersion:"v1.6.5", GitCommit:"490c6f13df1cb6612e0993c4c14f2ff90f8cdbf3", GitTreeState:"clean", BuildDate:"2017-06-14T20:03:38Z", GoVersion:"go1.7.6", Compiler:"gc", Platform:"linux/amd64"}
Server Info:
$ cat /etc/redhat-release
CentOS Linux release 7.3.1611 (Core)
$ rpm -q kubernetes
kubernetes-1.6.5-1.x86_64
$ rpm -q docker-engine
docker-engine-1.12.6-1.el7.centos.x86_64
from kube-shell.
@k4k I've worked around the client-python errors and fixed it in #26. I would love to know if it fixes your issue. You can still check if it works by installing from my branch as follows
$ pip install -e git://github.com/vogxn/kube-shell.git@26-handle-client-python-errors#egg=kube-shell
If this does fix the issue, I'll put it out in a release soon.
from kube-shell.
@vogxn Different warning now:
kube-shell> kubectl describe configmap/Users/user/.pyenv/versions/3.5.1/envs/kube-shell-testing/lib/python3.5/site-pacs
InsecureRequestWarning
The full command I was attempting was:
kubectl describe configmap -ncluster
Ultimately, it looks like the commands succeeds but each new keystroke after the space following the configmap
noun produces a warning. You can see the beginning of each line contains the next character typed:
kube-shell> kubectl describe configmap /Users/user/.pyenv/versions/3.5.1/envs/kube-shell-testing/lib/python3.5/site-pas
InsecureRequestWarning)
-/Users/user/.pyenv/versions/3.5.1/envs/kube-shell-testing/lib/python3.5/site-packages/urllib3/connectionpool.py:852: s
InsecureRequestWarning)
n/Users/user/.pyenv/versions/3.5.1/envs/kube-shell-testing/lib/python3.5/site-packages/urllib3/connectionpool.py:852: s
InsecureRequestWarning)
c/Users/user/.pyenv/versions/3.5.1/envs/kube-shell-testing/lib/python3.5/site-packages/urllib3/connectionpool.py:852: s
InsecureRequestWarning)
l/Users/user/.pyenv/versions/3.5.1/envs/kube-shell-testing/lib/python3.5/site-packages/urllib3/connectionpool.py:852: s
InsecureRequestWarning)
u/Users/user/.pyenv/versions/3.5.1/envs/kube-shell-testing/lib/python3.5/site-packages/urllib3/connectionpool.py:852: s
InsecureRequestWarning)
/Users/user/.pyenv/versions/3.5.1/envs/kube-shell-testing/lib/python3.5/site-packages/urllib3/connectionpool.py:852: Is
InsecureRequestWarning)
s/Users/user/.pyenv/versions/3.5.1/envs/kube-shell-testing/lib/python3.5/site-packages/urllib3/connectionpool.py:852: s
InsecureRequestWarning)
t/Users/user/.pyenv/versions/3.5.1/envs/kube-shell-testing/lib/python3.5/site-packages/urllib3/connectionpool.py:852: s
InsecureRequestWarning)
er/Users/user/.pyenv/versions/3.5.1/envs/kube-shell-testing/lib/python3.5/site-packages/urllib3/connectionpool.py:852:s
InsecureRequestWarning)
kube-shell> kubectl describe configmap -ncluster
Name: cluster-traefik
Namespace: cluster
Labels: app=traefik
[...omitted for brevity...]
from kube-shell.
from kube-shell.
Ok, I've updated my branch further with a possible fix.
commit 3f3a21626dc807e77b57e9ccd3eae967d650ffbb
Author: Prasanna Santhanam <[email protected]>
Date: Tue Jul 11 21:44:26 2017 +0530
fixes #26: disable InsecureRequestWarning from urllib3
diff --git a/kubeshell/client.py b/kubeshell/client.py
index eaf46fb..cb6027d 100644
--- a/kubeshell/client.py
+++ b/kubeshell/client.py
@@ -8,6 +8,7 @@ import urllib3
# disable warnings on stdout/stderr from urllib3 connection errors
ulogger = logging.getLogger("urllib3")
ulogger.setLevel("ERROR")
+urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
class KubernetesClient(object):
from kube-shell.
Thanks @k4k - I'm merging my fix to master and will put out a release. Great to have quick feedback and testing :)
from kube-shell.
A new release is pushed to pypi with version 0.0.21
. An upgrade should fix this issue
from kube-shell.
Related Issues (20)
- [UX] YAML syntax highlight?
- Error when input backslash : No escaped character
- how can I switch multiple clusters? HOT 2
- Standard install broken on debian stretch
- Best way to collaborate?
- Server-side autocomplete doesn't work on kubernetes object names with Ubuntu 18.10 HOT 2
- Unable to use kube-shell in wsl (alpine)
- Python 3.7 support (fix deprecated yaml call) HOT 3
- Kube-shell for Windows is not passing input text to kubectl HOT 1
- on startup on RHEL 7.6 notebook get load errors
- [INFORMATION SHARE] A web based kubectl tool.
- Fix simple typo: recieve -> receive
- Execution error HOT 1
- rename-context missing from completion
- command not found: kubeshell HOT 3
- Autosuggestion isn't working on List of available pods HOT 1
- Warning while loading Kube-shell HOT 4
- Customize shell prompt
- Command not found HOT 2
- F5 button not able to change namespace
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kube-shell.