Specify kubespray version for docker run (#9519)
When operating kubespray from kubespray image with docker run, we need to checkout the specific kubespray version as the same as the image, because the sample inventory contains kubernetes version and the version of master branch could not be supported on the released kubespray, for example.
This commit is contained in:
parent
7c1ee142dd
commit
31d7e64073
1 changed files with 1 additions and 0 deletions
|
@ -57,6 +57,7 @@ A simple way to ensure you get all the correct version of Ansible is to use the
|
||||||
You will then need to use [bind mounts](https://docs.docker.com/storage/bind-mounts/) to get the inventory and ssh key into the container, like this:
|
You will then need to use [bind mounts](https://docs.docker.com/storage/bind-mounts/) to get the inventory and ssh key into the container, like this:
|
||||||
|
|
||||||
```ShellSession
|
```ShellSession
|
||||||
|
git checkout v2.20.0
|
||||||
docker pull quay.io/kubespray/kubespray:v2.20.0
|
docker pull quay.io/kubespray/kubespray:v2.20.0
|
||||||
docker run --rm -it --mount type=bind,source="$(pwd)"/inventory/sample,dst=/inventory \
|
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 \
|
--mount type=bind,source="${HOME}"/.ssh/id_rsa,dst=/root/.ssh/id_rsa \
|
||||||
|
|
Loading…
Reference in a new issue