Hello,
I have just uncomment the "kubernetes_context" and "kubernetes_namespace" parameters in the default inventory file but I have this error when I run the deployment.
> inventory:
localhost ansible_connection=local ansible_python_interpreter="/usr/bin/env python"
[all:vars]
dockerhub_base=ansible
dockerhub_version=9.0.1
# Kubernetes Install
kubernetes_context=awx-cluster
kubernetes_namespace=awx
...
TASK [kubernetes : Get Namespace Detail] ******************************************************************************************************************
task path: /root/Kub-awx-install.9.0.1/awx/installer/roles/kubernetes/tasks/kubernetes.yml:2
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "
kubectl get namespace awx", "delta": "0:00:00.313356", "end": "2019-11-06 08:30:31.489015", "msg": "non-zero return code", "rc": 1, "start": "2019-11-06 08:30:31.175659", "stderr": "error: the server doesn't have a resource type \"namespace\"", "stderr_lines": ["
error: the server doesn't have a resource type \"namespace\""], "stdout": "", "stdout_lines": []}
...ignoring
TASK [kubernetes : Create AWX Kubernetes Project] *********************************************************************************************************
task path: /root/Kub-awx-install.9.0.1/awx/installer/roles/kubernetes/tasks/kubernetes.yml:7
fatal: [localhost]: FAILED! => {"changed": true, "cmd": "
kubectl create namespace awx", "delta": "0:00:00.152700", "end": "2019-11-06 08:30:31.863581", "msg": "non-zero return code", "rc": 1, "start": "2019-11-06 08:30:31.710881", "stderr": "error: no matches for kind \"Namespace\" in version \"v1\"", "stderr_lines": ["error:
no matches for kind \"Namespace\" in version \"v1\""], "stdout": "", "stdout_lines": []}
PLAY RECAP ************************************************************************************************************************************************
localhost : ok=8 changed=2 unreachable=0 failed=1 skipped=39 rescued=0 ignored=1
When I check the Kube config file which is created in /root/.kube/config is :
apiVersion: v1
clusters: []
contexts:
- context:
cluster: ""
user: ""
name: awx-cluster
current-context: ""
kind: Config
preferences: {}
users: []
Any idea ????
Thanks :)