Closed Akasurde closed 3 years ago
@codeaprendiz Thanks for reporting this issue. Could you please provide the following
# ansible-galaxy collection list | grep kuber
Thanks @Akasurde , The following is the output
$ ansible-galaxy collection list | grep kuber
community.kubernetes 1.1.1
@codeaprendiz Please update the collection version to the latest i.e., 1.2.0. This issue is resolved in this specific verison.
Ah okay, let me check this and update you. Thanks a lot for your amazing support 🙏
$ ansible-galaxy collection list | grep kuber
community.kubernetes 1.1.1
kubernetes.core 1.1.1
$ ansible-galaxy collection install community.kubernetes
Starting galaxy collection install process
Process install dependency map
ERROR! Error when getting available collection versions for community.kubernetes from default (https://galaxy.ansible.com/api/) (HTTP Code: 500, Message: Internal Server Error Code: Unknown)
okay what ? Is the ansible-galaxy down or what ?
okay looks like they fixed it in time.
$ ansible-galaxy collection list | grep kuber
community.kubernetes 1.2.0
community.kubernetes 1.1.1
$ pip list | grep openshift
openshift 0.12.0
And it works now, I am not longer getting the error in k8s module. :)
TASK [k8s-app-deploy : deploy application on kubernetes] ***************************************************************************************************************************************************************
Wednesday 03 March 2021 07:25:44 +0000 (0:00:00.796) 0:00:04.205 *******
changed: [localhost]
@codeaprendiz We did extensive amount of work in dealing with the breaks the kubernetes v12 client introduced (that the openshift client replies upon) before releasing 1.2.0 of this collection. See #314 for more.
It looks like you may have resolved this issue by upgrading. I'm going to close this one as a duplicate of the problem behind #314.
From @codeaprendiz on Mar 01, 2021 09:49
SUMMARY
With the latest release of
openshift
version0.12.0
we started facing issue with ansible modulek8s
. The k8s module works fine with openshift version0.11.2
The following is the actual error which we are gettingISSUE TYPE
COMPONENT NAME
How we are using the module
ANSIBLE VERSION
CONFIGURATION
OS / ENVIRONMENT
STEPS TO REPRODUCE
Ensure that that the pip version is latest
apply: yes
force: yes
state: present kubeconfig: _kubeconfig/{{env}}/kubeconfig
resource_definition: "{{ version_deployment_file }}"
src: "/tmp/{{ env }}-{{ applicationName }}.yaml" register: k8s_apply_result no_log: "{{ no_logging_enabled }}" tags:
EXPECTED RESULTS
The deployment should be successful. It is successful when we use
openshift
version0.11.2
which is the previous release.ACTUAL RESULTS
Have already shared the verbose output above.
Copied from original issue: ansible/ansible#73745