You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Solve an issue where serviceaccount is not created (#238)
There is an issue that the flannel-overlay.yml does not create the ServiceAccount flannel and needed to be manually created. Also updated the readiness of the guide, there was an issue with a part of the code which identation was not okay
You can use Kubernetes to run a mixture of Linux and Windows nodes, so you can mix Pods that run on Linux on with Pods that run on Windows. This is a guide on how to register Windows nodes to your cluster.
7
5
8
-
9
6
10
7
## Before you begin
11
8
12
-
13
-
14
9
Your Kubernetes server must be at or later than version 1.22. To check the version, enter `kubectl version`.
15
10
16
-
17
-
18
11
- Obtain a [Windows Server 2019 license](https://www.microsoft.com/en-us/cloud-platform/windows-server-pricing) (or higher) in order to configure the Windows node that hosts Windows containers. If you are using VXLAN/Overlay networking you must have also have [KB4489899](https://support.microsoft.com/help/4489899) installed.
19
12
20
13
- A Linux-based Kubernetes kubeadm cluster in which you have access to the control plane (see [Creating a single control-plane cluster with kubeadm](https://kubernetes-docsy-staging.netlify.app/docs/setup/production-environment/tools/kubeadm/create-cluster-kubeadm/)).
21
14
22
-
23
15
24
16
## Objectives
25
17
26
-
27
-
28
18
- Register a Windows node to the cluster
29
-
30
19
- Configure networking so Pods and Services on Linux and Windows can communicate with each other
31
20
32
-
33
21
34
22
## Getting Started: Adding a Windows Node to Your Cluster
35
23
36
-
37
24
38
25
### Networking Configuration
39
26
40
-
41
-
42
27
Once you have a Linux-based Kubernetes control-plane node you are ready to choose a networking solution.
43
28
44
-
45
29
46
30
#### Configuring Flannel with rancher
47
31
48
-
49
-
50
32
1. Prepare Kubernetes control plane for Flannel
51
33
52
34
Some minor preparation is recommended on the Kubernetes control plane in our cluster. It is recommended to enable bridged IPv4 traffic to iptables chains when using Flannel. The following command must be run on all Linux nodes:
Modify the `net-conf.json` section of the flannel manifest in order to set the VNI to 4096 and the Port to 4789. It should look as follows:
71
49
72
50
```json
73
-
74
51
net-conf.json: |
75
-
76
-
{
77
-
78
-
"Network": "10.244.0.0/16",
79
-
80
-
"Backend": {
81
-
82
-
"Type": "vxlan",
83
-
84
-
"VNI" : 4096,
85
-
86
-
"Port": 4789
87
-
88
-
}
89
-
90
-
}
91
-
52
+
{
53
+
"Network": "10.244.0.0/16",
54
+
"Backend": {
55
+
"Type": "vxlan",
56
+
"VNI" : 4096,
57
+
"Port": 4789
58
+
}
59
+
}
92
60
```
93
61
94
62
> **Note:** The VNI must be set to 4096 and port 4789 for Flannel on Linux to interoperate with Flannel on Windows. See the [VXLAN documentation](https://github.com/coreos/flannel/blob/master/Documentation/backends.md#vxlan). for an explanation of these fields.
@@ -100,83 +68,60 @@ net-conf.json: |
100
68
Let's apply the Flannel configuration:
101
69
102
70
```bash
103
-
104
71
kubectl apply -f kube-flannel.yml
105
-
106
72
```
107
73
108
74
After a few minutes, you should see all the pods as running if the Flannel pod network was deployed.
109
75
110
76
```bash
111
-
112
-
kubectl get pods -n kube-system
113
-
77
+
kubectl get pods -n kube-flannel
114
78
```
115
79
116
80
The output should include the Linux flannel DaemonSet as running:
Now you can add Windows-compatible versions of Flannel and kube-proxy. In order to ensure that you get a compatible version of kube-proxy, you'll need to substitute the tag of the image. The following example shows usage for Kubernetes v1.24.3, but you should adjust the version for your own deployment.
133
91
134
-
135
-
136
92
```bash
137
-
138
93
curl -L https://github.com/kubernetes-sigs/sig-windows-tools/releases/latest/download/kube-proxy.yml | sed 's/VERSION/v1.24.3/g'| kubectl apply -f -
> **Note:** All code snippets in Windows sections are to be run in a PowerShell environment with elevated permissions (Administrator) on the Windows worker node.
161
113
162
-
163
-
164
114
1. Install ContainerD, wins, kubelet, and kubeadm.
> **Note** If you want to install another version of kubernetes, modify v1.24.3 with the version you want to install
@@ -190,40 +135,23 @@ Use the command that was given to you when you ran `kubeadm init` on a control p
190
135
191
136
> **Note:** Do not forget to add `--cri-socket "npipe:////./pipe/containerd-containerd" --v=5` at the end of the join command, if you use ContainerD
192
137
193
-
194
-
195
138
3. Install kubectl for windows (optional)
196
139
197
140
For more information about it : https://kubernetes.io/docs/tasks/tools/install-kubectl-windows/
198
141
199
-
200
142
201
143
#### Verifying your installation
202
144
203
-
204
-
205
145
You should now be able to view the Windows node in your cluster by running:
206
146
207
-
208
-
209
147
```bash
210
-
211
148
kubectl get nodes -o wide
212
-
213
149
```
214
150
215
-
216
-
217
151
If your new node is in the `NotReady` state it is likely because the flannel image is still downloading. You can check the progress as before by checking on the flannel pods in the `kube-system` namespace:
218
152
219
-
220
-
221
153
```shell
222
-
223
154
kubectl -n kube-system get pods -l app=flannel
224
-
225
155
```
226
156
227
-
228
-
229
157
Once the flannel Pod is running, your node should enter the `Ready` state and then be available to handle workloads.
0 commit comments