Skip to content

Commit e52929a

Browse files
mburke5678Michael Burke
authored andcommitted
OSDOCS4041: Support Windows Containers on GCP
1 parent 4e767ac commit e52929a

File tree

6 files changed

+115
-0
lines changed

6 files changed

+115
-0
lines changed

_topic_maps/_topic_map.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2184,6 +2184,8 @@ Topics:
21842184
File: creating-windows-machineset-azure
21852185
- Name: Creating a Windows MachineSet object on vSphere
21862186
File: creating-windows-machineset-vsphere
2187+
- Name: Creating a Windows MachineSet object on GCP
2188+
File: creating-windows-machineset-gcp
21872189
- Name: Scheduling Windows container workloads
21882190
File: scheduling-windows-workloads
21892191
- Name: Windows node upgrades

modules/machine-api-overview.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-aws.adoc
1010
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-azure.adoc
1111
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-vsphere.adoc
12+
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-gcp.adoc
1213

1314
:_content-type: CONCEPT
1415
[id="machine-api-overview_{context}"]

modules/machineset-creating.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-aws.adoc
1212
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-azure.adoc
1313
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-vsphere.adoc
14+
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-gcp.adoc
1415

1516
ifeval::["{context}" == "creating-windows-machineset-aws"]
1617
:win:

modules/windows-machineset-gcp.adoc

Lines changed: 80 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,80 @@
1+
// Module included in the following assemblies:
2+
//
3+
// * windows_containers/creating_windows_machinesets/creating-windows-machineset-gcp.adoc
4+
5+
[id="windows-machineset-gcp_{context}"]
6+
= Sample YAML for a Windows MachineSet object on GCP
7+
8+
This sample YAML file defines a Windows `MachineSet` object running on Google Cloud Platform (GCP) that the Windows Machine Config Operator (WMCO) can use.
9+
10+
[source,yaml]
11+
----
12+
apiVersion: machine.openshift.io/v1beta1
13+
kind: MachineSet
14+
metadata:
15+
labels:
16+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
17+
name: <infrastructure_id>-windows-worker-<zone_suffix> <2>
18+
namespace: openshift-machine-api
19+
spec:
20+
replicas: 1
21+
selector:
22+
matchLabels:
23+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
24+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-windows-worker-<zone_suffix> <2>
25+
template:
26+
metadata:
27+
labels:
28+
machine.openshift.io/cluster-api-cluster: <infrastructure_id> <1>
29+
machine.openshift.io/cluster-api-machine-role: worker
30+
machine.openshift.io/cluster-api-machine-type: worker
31+
machine.openshift.io/cluster-api-machineset: <infrastructure_id>-windows-worker-<zone_suffix> <2>
32+
machine.openshift.io/os-id: Windows <3>
33+
spec:
34+
metadata:
35+
labels:
36+
node-role.kubernetes.io/worker: "" <4>
37+
providerSpec:
38+
value:
39+
apiVersion: machine.openshift.io/v1beta1
40+
canIPForward: false
41+
credentialsSecret:
42+
name: gcp-cloud-credentials
43+
deletionProtection: false
44+
disks:
45+
- autoDelete: true
46+
boot: true
47+
image: <windows_server_image> <5>
48+
sizeGb: 128
49+
type: pd-ssd
50+
kind: GCPMachineProviderSpec
51+
machineType: n1-standard-4
52+
networkInterfaces:
53+
- network: <infrastructure_id>-network <1>
54+
subnetwork: <infrastructure_id>-worker-subnet
55+
projectID: <project_id> <6>
56+
region: <region> <7>
57+
serviceAccounts:
58+
- email: <infrastructure_id>-w@<project_id>.iam.gserviceaccount.com
59+
scopes:
60+
- https://www.googleapis.com/auth/cloud-platform
61+
tags:
62+
- <infrastructure_id>-worker
63+
userDataSecret:
64+
name: windows-user-data <8>
65+
zone: <zone> <9>
66+
----
67+
<1> Specify the infrastructure ID that is based on the cluster ID that you set when you provisioned the cluster. You can obtain the infrastructure ID by running the following command:
68+
+
69+
[source,terminal]
70+
----
71+
$ oc get -o jsonpath='{.status.infrastructureName}{"\n"}' infrastructure cluster
72+
----
73+
<2> Specify the infrastructure ID, worker label, and zone suffix (such as `a`).
74+
<3> Configure the machine set as a Windows machine.
75+
<4> Configure the Windows node as a compute machine.
76+
<5> Specify the full path to an image of a supported version of Windows Server.
77+
<6> Specify the GCP project that this cluster was created in.
78+
<7> Specify the GCP region, such as `us-central1`.
79+
<8> Created by the WMCO when it configures the first Windows machine. After that, the `windows-user-data` is available for all subsequent machine sets to consume.
80+
<9> Specify the zone within the chosen region, such as `us-central1-a`.

modules/wmco-prerequisites.adoc

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,9 @@ a|* Windows Server 2022, OS Build link:https://support.microsoft.com/en-us/topic
2727
|VMware vSphere
2828
|Windows Server 2022, OS Build link:https://support.microsoft.com/en-us/topic/april-25-2022-kb5012637-os-build-20348-681-preview-2233d69c-d4a5-4be9-8c24-04a450861a8d[20348.681] or later
2929

30+
|Google Cloud Platform (GCP)
31+
|Windows Server 2022, OS Build link:https://support.microsoft.com/en-us/topic/april-25-2022-kb5012637-os-build-20348-681-preview-2233d69c-d4a5-4be9-8c24-04a450861a8d[20348.681] or later
32+
3033
|Bare metal or provider agnostic
3134
a|* Windows Server 2022, OS Build link:https://support.microsoft.com/en-us/topic/april-25-2022-kb5012637-os-build-20348-681-preview-2233d69c-d4a5-4be9-8c24-04a450861a8d[20348.681] or later
3235
* Windows Server 2019, version 1809
@@ -52,6 +55,9 @@ Hybrid networking with OVN-Kubernetes is the only supported networking configura
5255
|VMware vSphere
5356
|Hybrid networking with OVN-Kubernetes with a custom VXLAN port
5457

58+
|Google Cloud Platform (GCP)
59+
|Hybrid networking with OVN-Kubernetes
60+
5561
|Bare metal or provider agnostic
5662
|Hybrid networking with OVN-Kubernetes
5763
|===
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
:_content-type: ASSEMBLY
2+
[id="creating-windows-machineset-gcp"]
3+
= Creating a Windows `MachineSet` object on GCP
4+
include::_attributes/common-attributes.adoc[]
5+
:context: creating-windows-machineset-gcp
6+
7+
toc::[]
8+
9+
You can create a Windows `MachineSet` object to serve a specific purpose in your {product-title} cluster on Google Cloud Platform (GCP). For example, you might create infrastructure Windows machine sets and related machines so that you can move supporting Windows workloads to the new Windows machines.
10+
11+
[discrete]
12+
== Prerequisites
13+
14+
* You installed the Windows Machine Config Operator (WMCO) using Operator Lifecycle Manager (OLM).
15+
* You are using a supported Windows Server as the operating system image.
16+
17+
include::modules/machine-api-overview.adoc[leveloffset=+1]
18+
include::modules/windows-machineset-gcp.adoc[leveloffset=+1]
19+
include::modules/machineset-creating.adoc[leveloffset=+1]
20+
21+
[role="_additional-resources"]
22+
[id="creating-windows-machineset-gcp-additional"]
23+
== Additional resources
24+
25+
* For more information on managing machine sets, see xref:../../machine_management/index.adoc#overview-of-machine-management[Overview of machine management].

0 commit comments

Comments
 (0)