Kubespray-readme-3.sh
· 425 B · Bash
原始文件
git checkout v2.26.0
docker pull quay.io/kubespray/kubespray:v2.26.0
docker run --rm -it --mount type=bind,source="$(pwd)"/inventory/sample,dst=/inventory \
--mount type=bind,source="${HOME}"/.ssh/id_rsa,dst=/root/.ssh/id_rsa \
quay.io/kubespray/kubespray:v2.26.0 bash
# Inside the container you may now run the kubespray playbooks:
ansible-playbook -i /inventory/inventory.ini --private-key /root/.ssh/id_rsa cluster.yml
1 | git checkout v2.26.0 |
2 | docker pull quay.io/kubespray/kubespray:v2.26.0 |
3 | docker run --rm -it --mount type=bind,source="$(pwd)"/inventory/sample,dst=/inventory \ |
4 | --mount type=bind,source="${HOME}"/.ssh/id_rsa,dst=/root/.ssh/id_rsa \ |
5 | quay.io/kubespray/kubespray:v2.26.0 bash |
6 | # Inside the container you may now run the kubespray playbooks: |
7 | ansible-playbook -i /inventory/inventory.ini --private-key /root/.ssh/id_rsa cluster.yml |