att-comdev / armada

This project has moved to OpenStack.
https://www.airshipit.org/
Apache License 2.0
78 stars 35 forks source link

support for minikube #197

Open naeemrashid opened 6 years ago

naeemrashid commented 6 years ago

Currently I am facing authentication failed errors with minikube here is what I have tried mounting ~/.minikube into docker container and ~/.kube

sudo docker run -d --net host -p 8000:8000 --name armada \
    -v ~/.kube/config:/armada/.kube/config \
    -v $(pwd)/examples/:/examples
    -v $HOME/.minikube:/home/<username>/.minikube quay.io/attcomdev/armada:latest

Tried to check tiller status docker exec armada armada tiller --status

Error Log

2018-03-26 13:13:53,483 WARNING Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied'))': /api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller
2018-03-26 13:13:53.483 256 WARNING urllib3.connectionpool [-] Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied'))': /api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller
2018-03-26 13:13:53,484 WARNING Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied'))': /api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller
2018-03-26 13:13:53.484 256 WARNING urllib3.connectionpool [-] Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied'))': /api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller
2018-03-26 13:13:53,485 WARNING Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied'))': /api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller
2018-03-26 13:13:53.485 256 WARNING urllib3.connectionpool [-] Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied'))': /api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller
2018-03-26 13:13:53.487 256 ERROR armada.cli [-] Caught unexpected exception: urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.99.100', port=8443): Max retries exceeded with url: /api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller (Caused by ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied')))
2018-03-26 13:13:53.487 256 ERROR armada.cli Traceback (most recent call last):
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 601, in urlopen
2018-03-26 13:13:53.487 256 ERROR armada.cli     chunked=chunked)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 346, in _make_request
2018-03-26 13:13:53.487 256 ERROR armada.cli     self._validate_conn(conn)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 850, in _validate_conn
2018-03-26 13:13:53.487 256 ERROR armada.cli     conn.connect()
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/connection.py", line 326, in connect
2018-03-26 13:13:53.487 256 ERROR armada.cli     ssl_context=context)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/util/ssl_.py", line 327, in ssl_wrap_socket
2018-03-26 13:13:53.487 256 ERROR armada.cli     context.load_cert_chain(certfile, keyfile)
2018-03-26 13:13:53.487 256 ERROR armada.cli PermissionError: [Errno 13] Permission denied
2018-03-26 13:13:53.487 256 ERROR armada.cli
2018-03-26 13:13:53.487 256 ERROR armada.cli During handling of the above exception, another exception occurred:
2018-03-26 13:13:53.487 256 ERROR armada.cli
2018-03-26 13:13:53.487 256 ERROR armada.cli Traceback (most recent call last):
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/armada/cli/__init__.py", line 40, in safe_invoke
2018-03-26 13:13:53.487 256 ERROR armada.cli     self.invoke()
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/armada/cli/tiller.py", line 97, in invoke
2018-03-26 13:13:53.487 256 ERROR armada.cli     tiller_namespace=self.tiller_namespace)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/armada/handlers/tiller.py", line 69, in __init__
2018-03-26 13:13:53.487 256 ERROR armada.cli     self.channel = self.get_channel()
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/armada/handlers/tiller.py", line 91, in get_channel
2018-03-26 13:13:53.487 256 ERROR armada.cli     tiller_ip = self._get_tiller_ip()
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/armada/handlers/tiller.py", line 139, in _get_tiller_ip
2018-03-26 13:13:53.487 256 ERROR armada.cli     pod = self._get_tiller_pod()
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/armada/handlers/tiller.py", line 117, in _get_tiller_pod
2018-03-26 13:13:53.487 256 ERROR armada.cli     CONF.tiller_pod_labels).items
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/armada/handlers/k8s.py", line 99, in get_namespace_pod
2018-03-26 13:13:53.487 256 ERROR armada.cli     namespace, label_selector=label_selector)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/kubernetes/client/apis/core_v1_api.py", line 12291, in list_namespaced_pod
2018-03-26 13:13:53.487 256 ERROR armada.cli     (data) = self.list_namespaced_pod_with_http_info(namespace, **kwargs)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/kubernetes/client/apis/core_v1_api.py", line 12394, in list_namespaced_pod_with_http_info
2018-03-26 13:13:53.487 256 ERROR armada.cli     collection_formats=collection_formats)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/kubernetes/client/api_client.py", line 321, in call_api
2018-03-26 13:13:53.487 256 ERROR armada.cli     _return_http_data_only, collection_formats, _preload_content, _request_timeout)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/kubernetes/client/api_client.py", line 155, in __call_api
2018-03-26 13:13:53.487 256 ERROR armada.cli     _request_timeout=_request_timeout)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/kubernetes/client/api_client.py", line 342, in request
2018-03-26 13:13:53.487 256 ERROR armada.cli     headers=headers)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/kubernetes/client/rest.py", line 231, in GET
2018-03-26 13:13:53.487 256 ERROR armada.cli     query_params=query_params)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/kubernetes/client/rest.py", line 205, in request
2018-03-26 13:13:53.487 256 ERROR armada.cli     headers=headers)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/request.py", line 66, in request
2018-03-26 13:13:53.487 256 ERROR armada.cli     **urlopen_kw)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/request.py", line 87, in request_encode_url
2018-03-26 13:13:53.487 256 ERROR armada.cli     return self.urlopen(method, url, **extra_kw)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/poolmanager.py", line 321, in urlopen
2018-03-26 13:13:53.487 256 ERROR armada.cli     response = conn.urlopen(method, u.request_uri, **kw)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 668, in urlopen
2018-03-26 13:13:53.487 256 ERROR armada.cli     **response_kw)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 668, in urlopen
2018-03-26 13:13:53.487 256 ERROR armada.cli     **response_kw)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 668, in urlopen
2018-03-26 13:13:53.487 256 ERROR armada.cli     **response_kw)
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/connectionpool.py", line 639, in urlopen
2018-03-26 13:13:53.487 256 ERROR armada.cli     _stacktrace=sys.exc_info()[2])
2018-03-26 13:13:53.487 256 ERROR armada.cli   File "/usr/local/lib/python3.5/site-packages/urllib3/util/retry.py", line 388, in increment
2018-03-26 13:13:53.487 256 ERROR armada.cli     raise MaxRetryError(_pool, url, error or ResponseError(cause))
2018-03-26 13:13:53.487 256 ERROR armada.cli urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='192.168.99.100', port=8443): Max retries exceeded with url: /api/v1/namespaces/kube-system/pods?labelSelector=app%3Dhelm%2Cname%3Dtiller (Caused by ProtocolError('Connection aborted.', PermissionError(13, 'Permission denied')))
2018-03-26 13:13:53.487 256 ERROR armada.cli
MarshM commented 6 years ago

Sorry for the delay in responding! We don't currently support a minikube setup, but it should definitely be possible. Time permitting, this is something I want to achieve in the future, including a documented setup with minikube.