![ip kubespray 구성: "msg": "IPv4: '['.....']' 및 IPv6: '['f....']'에 '....'가 포함되어 있지 않습니다."](https://rvso.com/image/789360/ip%20kubespray%20%EA%B5%AC%EC%84%B1%3A%20%22msg%22%3A%20%22IPv4%3A%20'%5B'.....'%5D'%20%EB%B0%8F%20IPv6%3A%20'%5B'f....'%5D'%EC%97%90%20'....'%EA%B0%80%20%ED%8F%AC%ED%95%A8%EB%90%98%EC%96%B4%20%EC%9E%88%EC%A7%80%20%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4.%22.png)
Kubespray를 사용하여 Oracle Cloud VM에 Kubernetes를 설치하고 싶습니다. 나는 다음 단계를 시도했습니다.
apt install python3-pip
git clone https://github.com/kubernetes-sigs/kubespray
cd kubespray
git checkout master #if you want to change version
sudo pip3 install -r requirements.txt
cp -rfp inventory/sample inventory/mycluster
declare -a IPS=(192.168.1.24 192.168.1.25 192.168.1.26)
CONFIG_FILE=inventory/mycluster/hosts.yaml python3 contrib/inventory_builder/inventory.py ${IPS[@]}
vi inventory/mycluster/hosts.yaml
ansible-playbook -i inventory/mycluster/hosts.yaml --become --become-user=root cluster.yml
Oracle 클라우드의 모든 VM에는 10.0.0.x 및 공용 141.147.3.x와 같은 개인 IP가 있습니다. Kubespray 실행 중에 다음 오류가 발생합니다.
fatal: [node1]: FAILED! => {
"assertion": "(ip in ansible_all_ipv4_addresses) or (ip in ansible_all_ipv6_addresses)",
"changed": false,
"evaluated_to": false,
"msg": "IPv4: '['10.0.0.x']' and IPv6: '['........']' do not contain '141.147.3.x'"
}
클러스터 파일에는 다음 구성이 있습니다.
all:
hosts:
node1:
ansible_host: 192.168.1.24
ip: 192.168.1.24
access_ip: 192.168.1.24
node2:
ansible_host: 192.168.1.25
ip: 192.168.1.25
access_ip: 192.168.1.25
node3:
ansible_host: 192.168.1.26
ip: 192.168.1.26
access_ip: 192.168.1.26
children:
kube_control_plane:
hosts:
node1:
kube_node:
hosts:
node2:
node3:
etcd:
hosts:
node1:
node2:
node3:
k8s_cluster:
children:
kube_control_plane:
kube_node:
calico_rr:
hosts: {}
- 이는 단지 예시 IP일 뿐입니다.
이 문제를 어떻게 해결할 수 있는지 아시나요?