Hi
I am getting error when i am trying to install calico in kubernetes master node using ansible in aws ec2.
below is my ansible script for calico
- name: “calico install”
command: kubectl apply -f https://docs.projectcalico.org/manifests/calico.yaml
changed_when: true
I am getting below error
fatal: [3.17.156.44]: FAILED! => {“changed”: true, “cmd”: [“kubectl”, “apply”, “-f”, “https://docs.projectcalico.org/manifests/calico.yaml”], “delta”: “0:00:00.078516”, “end”: “2022-05-05 14:34:29.623821”, “msg”: “non-zero return code”, “rc”: 1, “start”: “2022-05-05 14:34:29.545305”, “stderr”: “The connection to the server 172.31.12.29:6443 was refused - did you specify the right host or port?”, “stderr_lines”: [“The connection to the server 172.31.12.29:6443 was refused - did you specify the right host or port?”], “stdout”: “”, “stdout_lines”: }
Can anyone please suggest me about this error?