Merge pull request #87629 from pjh/gcp-windows-nodes-20200114

Update GCP Windows node image versions
This commit is contained in:
Kubernetes Prow Robot 2020-02-01 18:33:34 -08:00 committed by GitHub
commit a77ed7234c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 28 additions and 23 deletions

View File

@ -63,7 +63,7 @@ MIG_WAIT_UNTIL_STABLE_TIMEOUT=${MIG_WAIT_UNTIL_STABLE_TIMEOUT:-1800}
MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}} MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}} NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
WINDOWS_NODE_OS_DISTRIBUTION=${WINDOWS_NODE_OS_DISTRIBUTION:-win1809} WINDOWS_NODE_OS_DISTRIBUTION=${WINDOWS_NODE_OS_DISTRIBUTION:-win2019}
if [[ "${MASTER_OS_DISTRIBUTION}" == "cos" ]]; then if [[ "${MASTER_OS_DISTRIBUTION}" == "cos" ]]; then
MASTER_OS_DISTRIBUTION="gci" MASTER_OS_DISTRIBUTION="gci"

View File

@ -66,7 +66,7 @@ MIG_WAIT_UNTIL_STABLE_TIMEOUT=${MIG_WAIT_UNTIL_STABLE_TIMEOUT:-1800}
MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}} MASTER_OS_DISTRIBUTION=${KUBE_MASTER_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}} NODE_OS_DISTRIBUTION=${KUBE_NODE_OS_DISTRIBUTION:-${KUBE_OS_DISTRIBUTION:-gci}}
WINDOWS_NODE_OS_DISTRIBUTION=${WINDOWS_NODE_OS_DISTRIBUTION:-win1809} WINDOWS_NODE_OS_DISTRIBUTION=${WINDOWS_NODE_OS_DISTRIBUTION:-win2019}
if [[ "${MASTER_OS_DISTRIBUTION}" == "cos" ]]; then if [[ "${MASTER_OS_DISTRIBUTION}" == "cos" ]]; then
MASTER_OS_DISTRIBUTION="gci" MASTER_OS_DISTRIBUTION="gci"

View File

@ -83,14 +83,16 @@ function set-linux-node-image() {
# Requires: # Requires:
# WINDOWS_NODE_OS_DISTRIBUTION # WINDOWS_NODE_OS_DISTRIBUTION
# Sets: # Sets:
# WINDOWS_NODE_IMAGE_FAMILY
# WINDOWS_NODE_IMAGE_PROJECT # WINDOWS_NODE_IMAGE_PROJECT
# WINDOWS_NODE_IMAGE
function set-windows-node-image() { function set-windows-node-image() {
WINDOWS_NODE_IMAGE_PROJECT="windows-cloud" WINDOWS_NODE_IMAGE_PROJECT="windows-cloud"
if [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win2019" ]]; then if [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win2019" ]]; then
WINDOWS_NODE_IMAGE_FAMILY="windows-2019-core-for-containers" WINDOWS_NODE_IMAGE="windows-server-2019-dc-core-for-containers-v20200114"
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1909" ]]; then
WINDOWS_NODE_IMAGE="windows-server-1909-dc-core-for-containers-v20200114"
elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1809" ]]; then elif [[ "${WINDOWS_NODE_OS_DISTRIBUTION}" == "win1809" ]]; then
WINDOWS_NODE_IMAGE_FAMILY="windows-1809-core-for-containers" WINDOWS_NODE_IMAGE="windows-server-1809-dc-core-for-containers-v20200114"
else else
echo "Unknown WINDOWS_NODE_OS_DISTRIBUTION ${WINDOWS_NODE_OS_DISTRIBUTION}" >&2 echo "Unknown WINDOWS_NODE_OS_DISTRIBUTION ${WINDOWS_NODE_OS_DISTRIBUTION}" >&2
exit 1 exit 1
@ -2206,9 +2208,7 @@ function create-node-template() {
if [[ "${os}" == 'linux' ]]; then if [[ "${os}" == 'linux' ]]; then
node_image_flags="--image-project ${NODE_IMAGE_PROJECT} --image ${NODE_IMAGE}" node_image_flags="--image-project ${NODE_IMAGE_PROJECT} --image ${NODE_IMAGE}"
elif [[ "${os}" == 'windows' ]]; then elif [[ "${os}" == 'windows' ]]; then
# TODO(pjh): revert back to using WINDOWS_NODE_IMAGE_FAMILY instead of node_image_flags="--image-project ${WINDOWS_NODE_IMAGE_PROJECT} --image ${WINDOWS_NODE_IMAGE}"
# pinning to the v20190312 image once #76666 is resolved.
node_image_flags="--image-project ${WINDOWS_NODE_IMAGE_PROJECT} --image=windows-server-1809-dc-core-for-containers-v20190709"
else else
echo "Unknown OS ${os}" >&2 echo "Unknown OS ${os}" >&2
exit 1 exit 1

View File

@ -57,7 +57,7 @@ make quick-release
### 2. Create a Kubernetes cluster ### 2. Create a Kubernetes cluster
You can create a regular Kubernetes cluster or an end-to-end test cluster.<br /> You can create a regular Kubernetes cluster or an end-to-end test cluster.<br />
Only end-to-end test clusters support running the Kubernetes e2e tests (as both [e2e cluster creation](https://github.com/kubernetes/kubernetes/blob/b632eaddbaad9dc1430d214d506b72750bbb9f69/hack/e2e-internal/e2e-up.sh#L24) and [e2e test scripts](https://github.com/kubernetes/kubernetes/blob/b632eaddbaad9dc1430d214d506b72750bbb9f69/hack/ginkgo-e2e.sh#L42) are setup based on `cluster/gce/config-test.sh`), also enables some debugging features such as SSH access on the Windows nodes. Only end-to-end test clusters support running the Kubernetes e2e tests (as both [e2e cluster creation](https://github.com/kubernetes/kubernetes/blob/b632eaddbaad9dc1430d214d506b72750bbb9f69/hack/e2e-internal/e2e-up.sh#L24) and [e2e test scripts](https://github.com/kubernetes/kubernetes/blob/b632eaddbaad9dc1430d214d506b72750bbb9f69/hack/ginkgo-e2e.sh#L42) are setup based on `cluster/gce/config-test.sh`), also enables some debugging features such as SSH access on the Windows nodes.
Please make sure you set the environment variables properly following the Please make sure you set the environment variables properly following the
instructions in the previous section. instructions in the previous section.
@ -84,9 +84,12 @@ Now bring up a cluster using one of the following two methods:
``` ```
# Invoke kube-up.sh with these environment variables: # Invoke kube-up.sh with these environment variables:
# PROJECT: text name of your GCP project. # PROJECT: text name of your GCP project.
# WINDOWS_NODE_OS_DISTRIBUTION: the Windows version you want your nodes to
# run, e.g. win2019 or win1909.
# KUBE_UP_AUTOMATIC_CLEANUP (optional): cleans up existing cluster without # KUBE_UP_AUTOMATIC_CLEANUP (optional): cleans up existing cluster without
# prompting. # prompting.
PROJECT=${CLOUDSDK_CORE_PROJECT} KUBE_UP_AUTOMATIC_CLEANUP=true ./cluster/kube-up.sh PROJECT=${CLOUDSDK_CORE_PROJECT} WINDOWS_NODE_OS_DISTRIBUTION=win2019 \
KUBE_UP_AUTOMATIC_CLEANUP=true ./cluster/kube-up.sh
``` ```
To teardown the cluster run: To teardown the cluster run:
@ -95,21 +98,23 @@ To teardown the cluster run:
PROJECT=${CLOUDSDK_CORE_PROJECT} ./cluster/kube-down.sh PROJECT=${CLOUDSDK_CORE_PROJECT} ./cluster/kube-down.sh
``` ```
#### 2b. Create a Kubernetes end-to-end (E2E) test cluster #### 2b. Create a Kubernetes end-to-end (E2E) test cluster
If you have built your own release binaries following step 1, run the following If you have built your own release binaries following step 1, run the following
command: command:
``` ```
PROJECT=${CLOUDSDK_CORE_PROJECT} ./hack/e2e-internal/e2e-up.sh PROJECT=${CLOUDSDK_CORE_PROJECT} WINDOWS_NODE_OS_DISTRIBUTION=win2019 \
``` ./hack/e2e-internal/e2e-up.sh
```
If any e2e cluster exists already, this command will prompt you whether tears down and creates a new one. To teardown existing e2e cluster only, run the command: If any e2e cluster exists already, this command will prompt you to tear down and
``` create a new one. To teardown existing e2e cluster only, run the command:
PROJECT=${CLOUDSDK_CORE_PROJECT} ./hack/e2e-internal/e2e-down.sh ```
``` PROJECT=${CLOUDSDK_CORE_PROJECT} ./hack/e2e-internal/e2e-down.sh
```
No matter what type of cluster you chose to create, the result should be a No matter what type of cluster you chose to create, the result should be a
Kubernetes cluster with one Linux master node, `NUM_NODES` Linux worker nodes Kubernetes cluster with one Linux master node, `NUM_NODES` Linux worker nodes
and `NUM_WINDOWS_NODES` Windows worker nodes. and `NUM_WINDOWS_NODES` Windows worker nodes.
## Validating the cluster ## Validating the cluster