Browse Source

README: add docker run (#11967)

* README: add docker run

Signed-off-by: Loong <long0dai@foxmail.com>

* Update README.md

Co-authored-by: Robert Neumann <r0b2g1t@users.noreply.github.com>

* Update README.md

Co-authored-by: Robert Neumann <r0b2g1t@users.noreply.github.com>

---------

Signed-off-by: Loong <long0dai@foxmail.com>
Co-authored-by: Robert Neumann <r0b2g1t@users.noreply.github.com>
pull/11924/merge
Loong Dai 5 days ago
committed by GitHub
parent
commit
e0a141ab12
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
1 changed files with 12 additions and 0 deletions
  1. 12
      README.md

12
README.md

@ -15,6 +15,18 @@ You can get your invite [here](http://slack.k8s.io/)
Below are several ways to use Kubespray to deploy a Kubernetes cluster. Below are several ways to use Kubespray to deploy a Kubernetes cluster.
### Docker
Ensure you have installed Docker then
```ShellSession
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.27.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
```
### Ansible ### Ansible
#### Usage #### Usage

Loading…
Cancel
Save