Closed YoavNordmann closed 3 years ago
Hi @YoavNordmann
Did you try to use the Cluster URL like http://mylab-master01.mylab.lab ?
Thanks Luis
Hi @YoavNordmann
I reproduced, you need to use http:// o https:// on the URL
I was struggling with this error as well
I found the following:
$ cat ~/.kube/config | grep server:
server: https://192.168.99.101:8443
kubectl proxy
entrypoint does not work (could not isolate why).Hey @YoavNordmann, where is your cluster located? I added that because I found an issue with glcoud.
Thanks Luis
I am running minikube on my laptop, and our testing kube is an on premise kubernetes cluster. no amazon, no google, no nothing...
Yoav
having the same issue here
Still facing this issue, with from rundeck 3.2.9 ~ 3.3.3 and latest plug 2.0.1 Tried URL both with http or https and /root/.kube/config only, not working.
Traceback (most recent call last):
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.1/pods-resource-model.py", line 262, in <module>
main()
File "/home/rundeck/libext/cache/kubernetes-plugin-2.0.1/pods-resource-model.py", line 232, in main
watch=False,
File "/usr/local/lib/python3.5/dist-packages/kubernetes/client/api/core_v1_api.py", line 16864, in list_pod_for_all_namespaces
return self.list_pod_for_all_namespaces_with_http_info(**kwargs) # noqa: E501
File "/usr/local/lib/python3.5/dist-packages/kubernetes/client/api/core_v1_api.py", line 16981, in list_pod_for_all_namespaces_with_http_info
collection_formats=collection_formats)
File "/usr/local/lib/python3.5/dist-packages/kubernetes/client/api_client.py", line 353, in call_api
_preload_content, _request_timeout, _host)
File "/usr/local/lib/python3.5/dist-packages/kubernetes/client/api_client.py", line 184, in __call_api
_request_timeout=_request_timeout)
File "/usr/local/lib/python3.5/dist-packages/kubernetes/client/api_client.py", line 377, in request
headers=headers)
File "/usr/local/lib/python3.5/dist-packages/kubernetes/client/rest.py", line 243, in GET
query_params=query_params)
File "/usr/local/lib/python3.5/dist-packages/kubernetes/client/rest.py", line 216, in request
headers=headers)
File "/usr/local/lib/python3.5/dist-packages/urllib3/request.py", line 76, in request
method, url, fields=fields, headers=headers, **urlopen_kw
File "/usr/local/lib/python3.5/dist-packages/urllib3/request.py", line 97, in request_encode_url
return self.urlopen(method, url, **extra_kw)
File "/usr/local/lib/python3.5/dist-packages/urllib3/poolmanager.py", line 336, in urlopen
response = conn.urlopen(method, u.request_uri, **kw)
File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 659, in urlopen
conn = self._get_conn(timeout=pool_timeout)
File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 279, in _get_conn
return conn or self._new_conn()
File "/usr/local/lib/python3.5/dist-packages/urllib3/connectionpool.py", line 238, in _new_conn
**self.conn_kw
File "/usr/local/lib/python3.5/dist-packages/urllib3/connection.py", line 115, in __init__
_HTTPConnection.__init__(self, *args, **kw)
TypeError: __init__() got an unexpected keyword argument 'assert_hostname'
Hi, I have commented out the assert_hostname from main... and it works for me... def main(): .. c.assert_hostname = False Configuration.set_default(c) ..
Hi, I have commented out the assert_hostname from main... and it works for me... def main(): .. c.assert_hostname = False Configuration.set_default(c) ..
Hi @pshycomore ,
Thank you very much for you reply!
I searched pods-resource-model.py but cannot found these lines, would you pls tell me which file it's in?
Thank you very much!
Hi, I have commented out the assert_hostname from main... and it works for me... def main(): .. c.assert_hostname = False Configuration.set_default(c) .. Hi @pshycomore
I updated common.py as your suggestion, it's works now. Thank you very much! Do you know if there some other impact if we comments it out?
I am facing this issue on RunDeck 3.3.4 with python 3.6 and kubernetes plugin version 2.0.1
@ltamaster
removing the two following lines solved the issue
c.assert_hostname = False
Configuration.set_default(c)
can this fix be merged to the master and have new release ?
Hi, I have been working on the examples/pods_exec.py Assert_hostname is suppose to check if the name is in the SSLcertificate. But for most of us we just connect locally. So in our client calls we can bypass. Also this combination:
def main(): c = Configuration() Configuration.set_default(c) config.load_kube_config() c.assert_hostname = False core_v1 = core_v1_api.CoreV1Api() exec_commands(core_v1)
Would sound better to me as we initialize, and the complement with the load_kube_config. This strangely works, but it looks like the c.assert_hostname has really no effect. For the moment, I would recommend to bypass and if needed check the SSL certificate hostname in an other way. This may be a urllib3 bug...
in short replace by:
def main():
config.load_kube_config()
core_v1 = core_v1_api.CoreV1Api()
exec_commands(core_v1)
Cos kube config has all the connexion details.
Hi
I am having a lot of trouble setting up this plugin. My setup: I am running Rundeck inside a Kubernetes cluster, which I wish to manage using the same Rundeck. Furthermore, I want to use the same Rundeck to run commands and kubernetes jobs on the same cluster.
I have not succeeded in showing the kubernetes nodes as well as configuring the run of a simple "hello world" kubernetes job.
In the authentication section I have the following: Cluster URL: mylab-master01.mylab.lab Token: Token String of default token from kubernetes Verify SSL: Unchecked SSL Certificate Path: Blank
The following is the output of my job running.
Please help
Thank you
Yoav