Open gimballock opened 3 years ago
Here's what I've found
https://github.com/geerlingguy/ansible-for-kubernetes/issues/88
After downgrading kubernetes and openshift python packages and restarting minikube I still see the same issue.
$ pip3 list
Package Version
------------------- ---------
-ubernetes 11.0.0
...
docker-py 1.10.6
docker-pycreds 0.4.0
...
kubernetes 11.0.0
...
openshift 0.11.2
...
$ minikube stop
$ minikube start
😄 minikube v1.17.1 on Darwin 11.2.1
✨ Using the docker driver based on existing profile
👍 Starting control plane node minikube in cluster minikube
🔄 Restarting existing docker container for "minikube" ...
🐳 Preparing Kubernetes v1.20.2 on Docker 20.10.2 ...
🔎 Verifying Kubernetes components...
🌟 Enabled addons: storage-provisioner, default-storageclass
❗ /usr/local/bin/kubectl is version 1.18.6, which may have incompatibilites with Kubernetes 1.20.2.
▪ Want kubectl v1.20.2? Try 'minikube kubectl -- get pods -A'
🏄 Done! kubectl is now configured to use "minikube" cluster and "default" namespace by default
$ ansible-playbook -i inventory main.yml
...
TASK [Create and start the build container.]
...
"msg": "Error connecting: Error while fetching server API version: HTTPSConnectionPool(host='127.0.0.1', port=55002): Max retries exceeded with url: /version (Caused by SSLError(SSLError(1, '[SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:1123)')))"
Sorry, I should have read the error more. What version of python are you using?
Sorry for the delay, Python 3.9.2
I think what's happening is that you have the incorrect python compatibility with docker, or at least that is a part of it
Given this ticket, which I'm surprised you didn't get this error
https://github.com/ansible/ansible/issues/60748
Uninstall docker-py, and run pip3 install docker
https://github.com/geerlingguy/ansible-for-kubernetes/blob/555e16d04326ce54d998f7ec78e753799074f47e/ansible-containers/main.yml#L11
If using the same shell env from chapter 2 where we ran:
Then I get errors with 'docker_image' and 'docker_container' like this:
To get around this I have to either use a new shell or run the following: