We are doing some automation to do some health check by ansible and trying to use same config which provided to use from Jump server to connect K8s Cluster .
While using same config inside HC pod through playbook to check status or health of cluster for automation we are getting error as below .
"msg": "Failed to execute on pod ig-aerospike-rk1-0 due to : (0)\nReason: **Handshake status 403 Forbidden** -+-+- {'audit-id': '5c6dc947-2b6c-415a-8ad7-2e75982fbebc', 'cache-control': 'no-cache, private', 'content-type': 'application/json', 'x-content-type-options': 'nosniff', 'date': 'Tue, 17 Dec 2024 09:24:17 GMT', 'content-length': '313'} -+-+- b'{\"kind\":\"Status\",\"apiVersion\":\"v1\",\"metadata\":{},\"status\":\"Failure\",\"message\":\"pods \\\\\"ig-aerospike-rk1-0\\\\\" is forbidden: User \\\\\**"ccs_admin\\\\\" cannot get resource \\\\\"pods/exec**\\\\\" in API group \\\\\"\\\\\" in the namespace \\\\\"ncc-rmncc01\\\\\"\",\"reason\":\"Forbidden\",\"details\":{\"name\":\"ig-aerospike-rk1-0\",\"kind\":\"pods\"},\**"code\":403**}\\n'\n"
While with same config inside same HC pod using Kubectl we are able to execute command and getting information or can exec inside pod .
but same using curl or by playbook throwing error .