我正在尝试使用Terraform部署Kubernetes集群,并使用Ansible部署K8s对象。一切正常,使用Ansible K8s,也可以从本地YAML文件进行部署,但是当我尝试使用here所述的网址进行查找时,出现错误:
错误!发现一名工人处于死亡状态
部分Ansible任务:
- name: Fip-Controller rbac
k8s:
api_key: "{{ api_token }}"
host: "{{ api_url }}"
state: present
definition: "{{ item }}"
with_items: "{{lookup('url', 'https://raw.githubusercontent.com/cbeneke/hcloud-fip-controller/master/deploy/rbac.yaml', split_lines=False) | from_yaml_all | list}}"
when: item is not none
我也尝试过与here (same link as above)所述的相同。
A related Github issue with the same error
如果有人能向我指出任何方向,我将不胜感激。从URL添加YAML是否有更好的解决方案?
Ansible:v2.9.1操作系统:macOS Mojave