页次: 1
1,给pod内的resolv.conf添加选项
for i in `cat pod-list`; \
do \
kubectl exec -it -n gw $i -- bash -c "echo options single-request >> /etc/resolv.conf" ;\
done
2,设置/etc/hosts,跳过coredns
for i in `cat pod-list`;
do
kubectl exec -it -n phenix $i -- bash -c " \
echo 192.164.40.48 xxx.local.cn >>/etc/hosts ; \
echo 192.168.10.44 ccc.local.cn >>/etc/hosts "
done
离线
页次: 1