TASK [helm : RBAC configuration] **************************************************************************************************************************** Friday 22 May 2020 05:17:37 +0000 (0:00:00.574) 0:00:30.960 ************ fatal: [172.31.82.227]: FAILED! => {"changed": true, "cmd": "kubectl create -f /root/kubeadm-ansible/roles/helm/files/rbac-config.yml", "delta": "0:00:00.066491", "end": "2020-05-22 05:17:37.343180", "msg": "non-zero return code", "rc": 1, "start": "2020-05-22 05:17:37.276689", "stderr": "error: Missing or incomplete configuration info. Please point to an existing, complete config file:\n\n 1. Via the command-line flag --kubeconfig\n 2. Via the KUBECONFIG environment variable\n 3. In your home directory as ~/.kube/config\n\nTo view or setup config directly use the 'config' command.", "stderr_lines": ["error: Missing or incomplete configuration info. Please point to an existing, complete config file:", "", " 1. Via the command-line flag --kubeconfig", " 2. Via the KUBECONFIG environment variable", " 3. In your home directory as ~/.kube/config", "", "To view or setup config directly use the 'config' command."], "stdout": "", "stdout_lines": []}
It's not an RBAC error. It's cluster unreachable(KUBECONFIG variable not exported) error. To me the error seems to the issue with kubeconfig file missing or the path variable not set. On the node please add the following line to your .bashrc/.zshrc export KUBECONFIG=~/.kube/config
, if that's not the position of the kubeconfig file then export the correct path. You can add the same via --kubeconfig flag in kubectl create command.