* update reference to 1.17 (#18791) * update endpoint slices to beta (#18794) * update feature gate to 1.17 (#18799) * update feature gate to 1.17 * Update content/ja/docs/reference/command-line-tools-reference/feature-gates.md Co-Authored-By: inductor <kohei.ota@zozo.com> Co-authored-by: inductor <kohei.ota@zozo.com> * Update links to ja docs (home/, tasks/tools/install-kubectl/, concepts/services-networking/service/) (#18930) * update link to /ja/docs/home/ * update link to /ja/docs/tasks/tools/install-kubectl/ * update link to /ja/docs/concepts/services-networking/service/ * Translate tasks/administer-cluster/enabling-endpointslices.md in Japanese (#18140) (#18873) * Translate tasks/administer-cluster/enabling-endpointslices.md in Japanese (#18140) * Update enabling-endpointslices.md * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update enabling-endpointslices.md * Update enabling-endpointslices.md * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Takuya Tokuda <cs.toku.mail@gmail.com> * Update content/ja/docs/tasks/administer-cluster/enabling-endpointslices.md Co-Authored-By: Takuya Tokuda <cs.toku.mail@gmail.com> * Update enabling-endpointslices.md Co-authored-by: Naoki Oketani <okepy.naoki@gmail.com> Co-authored-by: Takuya Tokuda <cs.toku.mail@gmail.com> * update share process namespace (#19011) * Revert trailing whitespaces (#18988) * Correct a wrong resource name: Endpoint (#18954) * Correct a wrong resource name: Endpoint * Revert spaces at end of line * Update links to ja docs (concepts/workloads/) (#18959) * update link to /ja/docs/concepts/workloads/controllers/deployment/ * update link to /ja/docs/concepts/workloads/controllers/replicaset/ * update link to /ja/docs/concepts/workloads/controllers/statefulset/ * update link to /ja/docs/concepts/workloads/controllers/daemonset/ * update link to /ja/docs/concepts/workloads/pods/pod-overview/ * update link to /ja/docs/concepts/workloads/pods/pod/ * revert spaces at end of line * revert spaces at end of line * Replace links with redirect destination * partially update link to /ja/docs/concepts/workloads/pods/pod-lifecycle/ * Update daemonset to 1.17 (#18793) * update daemonset to 1.17 * Update content/ja/docs/concepts/workloads/controllers/daemonset.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/workloads/controllers/daemonset.md Co-Authored-By: nasa9084 <nasa9084@users.noreply.github.com> * apply review Co-authored-by: Naoki Oketani <okepy.naoki@gmail.com> Co-authored-by: nasa9084 <nasa9084@users.noreply.github.com> * remove ctrl-h (#19067) * remove reviewers block (#19091) * update link to /ja/docs/tasks/tools/install-minikube/ (#19147) * translate networking (#19134) * translate networking * apply review * apply review * Update content/ja/docs/concepts/cluster-administration/networking.md Co-Authored-By: nasa9084 <nasa9084@users.noreply.github.com> * nit Co-authored-by: nasa9084 <nasa9084@users.noreply.github.com> * update link to /ja/docs/concepts/overview/components/ (#19194) * fix a wrong field name (#19256) * update link to /ja/docs/concepts/configuration/assign-pod-node/ (#19324) * Translate docs/concepts/storage/persistent-volumes.md into Japanese (#19074) * translate content/ja/docs/concepts/storage/persistent-volumes.md into Japanese * Update content/ja/docs/concepts/storage/persistent-volumes.md translate title Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md fix missing translation Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md conform to translation style guide Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * conform to translation style guide * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * fix translation refer: https://github.com/kubernetes/website/pull/19074/files#r378950194 * fix translation * fix translation ref: https://github.com/kubernetes/website/pull/19074#discussion_r378931787 * fix translation ref: https://github.com/kubernetes/website/pull/19074#discussion_r378829190 * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * fix translation * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * fix translation follow https://github.com/kubernetes/website/pull/19074#discussion_r382130660 * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * fix translation https://github.com/kubernetes/website/pull/19074#discussion_r378811021 * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: nasa9084 <nasa9084@users.noreply.github.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: bells17 <bells171@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/concepts/storage/persistent-volumes.md Co-Authored-By: nasa9084 <nasa9084@users.noreply.github.com> * fix translation https://github.com/kubernetes/website/pull/19074/files#r380769175 * fix translation https://github.com/kubernetes/website/pull/19074#discussion_r380745506 * fix translation https://github.com/kubernetes/website/pull/19074#discussion_r381264848 Co-authored-by: Naoki Oketani <okepy.naoki@gmail.com> Co-authored-by: bells17 <bells171@gmail.com> Co-authored-by: nasa9084 <nasa9084@users.noreply.github.com> * update link to /ja/docs/tutorials/hello-minikube/ and /ja/docs/concepts/architecture/nodes/ (#19515) * Translate tasks/configure-pod-container/configure-projected-volume-storage.md into Japanese (#19240) * copy from content/en/docs/tasks/configure-pod-container/configure-projected-volume-storage.md Signed-off-by: Takuma Hashimoto <takumaxd+github@gmail.com> * Translate content/ja/docs/tasks/configure-pod-container/configure-projected-volume-storage.md into Japanese Signed-off-by: Takuma Hashimoto <takumaxd+github@gmail.com> * fix translation https://kubernetes.io/ja/docs/tasks/debug-application-cluster/get-shell-running-container/ にて、「シェルを取得する」という表現が用いられているため、そちらに合わせる Signed-off-by: Takuma Hashimoto <takumaxd+github@gmail.com> * fix terminology 投影 -> Projected (#19641) * translate configure-access-multiple-clusters into Japanese (#19563) * translate configure-access-multiple-clusters into Japanese * reflect PR feedback * Translate concepts/cluster-administration/cluster-administration-overview.md into Japanese #18829 (#19258) * ja-trans: translate concepts/cluster-administration/cluster-administration-overview.md into Japanese (#18829) * ja-trans: Improve Japanese translation in concepts/cluster-administration/cluster-administration-overview.md (#18829) * ja-trans: Improve Japanese translation in concepts/cluster-administration/cluster-administration-overview.md (#18829) * Translate tasks/service-catalog/install-service-catalog-using-helm/ in Japanese (#19776) * issue 18957 * translate a reference file * Update content/ja/docs/reference/glossary/service-catalog.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/reference/glossary/service-catalog.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Update content/ja/docs/tasks/service-catalog/install-service-catalog-using-helm.md Co-Authored-By: Naoki Oketani <okepy.naoki@gmail.com> * Apply suggestions from code review Co-Authored-By: Tim Bannister <tim@scalefactory.com> * Apply suggestions from code review Co-Authored-By: Tim Bannister <tim@scalefactory.com> Co-authored-by: Naoki Oketani <okepy.naoki@gmail.com> Co-authored-by: inductor <kohei.ota@zozo.com> Co-authored-by: Tim Bannister <tim@scalefactory.com> * Fix dead link of api-conventions doc (#19801) Co-authored-by: Naoki Oketani <okepy.naoki@gmail.com> Co-authored-by: Jin Hase <hase.jin@jp.fujitsu.com> Co-authored-by: Takuya Tokuda <cs.toku.mail@gmail.com> Co-authored-by: nasa9084 <nasa9084@users.noreply.github.com> Co-authored-by: Takahashi Tomohiko <takahashi@tomohiko.io> Co-authored-by: bells17 <bells171@gmail.com> Co-authored-by: Takuma Hashimoto <takumaxd+github@gmail.com> Co-authored-by: Joe Kamibeppu <joekamibeppu@gmail.com> Co-authored-by: Keita Akutsu <kakts.git@gmail.com> Co-authored-by: SatoruItaya <44042909+SatoruItaya@users.noreply.github.com> Co-authored-by: Tim Bannister <tim@scalefactory.com> Co-authored-by: KoyamaSohei <koyamaso0309@gmail.com>
14 KiB
title, content_template, weight
| title | content_template | weight |
|---|---|---|
| Guide for adding Windows Nodes in Kubernetes | templates/concept | 70 |
{{% capture overview %}}
The Kubernetes platform can now be used to run both Linux and Windows containers. One or more Windows nodes can be registered to a cluster. This guide shows how to:
- Register a Windows node to the cluster
- Configure networking so pods on Linux and Windows can communicate
{{% /capture %}}
{{% capture body %}}
Before you begin
-
Obtain a Windows Server license in order to configure the Windows node that hosts Windows containers. You can use your organization's licenses for the cluster, or acquire one from Microsoft, a reseller, or via the major cloud providers such as GCP, AWS, and Azure by provisioning a virtual machine running Windows Server through their marketplaces. A time-limited trial is also available.
-
Build a Linux-based Kubernetes cluster in which you have access to the control plane (some examples include Creating a single control-plane cluster with kubeadm, AKS Engine, GCE, AWS.
Getting Started: Adding a Windows Node to Your Cluster
Plan IP Addressing
Kubernetes cluster management requires careful planning of your IP addresses so that you do not inadvertently cause network collision. This guide assumes that you are familiar with the Kubernetes networking concepts.
In order to deploy your cluster you need the following address spaces:
| Subnet / address range | Description | Default value |
|---|---|---|
| Service Subnet | A non-routable, purely virtual subnet that is used by pods to uniformly access services without caring about the network topology. It is translated to/from routable address space by kube-proxy running on the nodes. |
10.96.0.0/12 |
| Cluster Subnet | This is a global subnet that is used by all pods in the cluster. Each node is assigned a smaller /24 subnet from this for their pods to use. It must be large enough to accommodate all pods used in your cluster. To calculate minimumsubnet size: (number of nodes) + (number of nodes * maximum pods per node that you configure). Example: for a 5 node cluster for 100 pods per node: (5) + (5 * 100) = 505. |
10.244.0.0/16 |
| Kubernetes DNS Service IP | IP address of kube-dns service that is used for DNS resolution & cluster service discovery. |
10.96.0.10 |
Review the networking options supported in 'Intro to Windows containers in Kubernetes: Supported Functionality: Networking' to determine how you need to allocate IP addresses for your cluster.
Components that run on Windows
While the Kubernetes control plane runs on your Linux node(s), the following components are configured and run on your Windows node(s).
- kubelet
- kube-proxy
- kubectl (optional)
- Container runtime
Get the latest binaries from https://github.com/kubernetes/kubernetes/releases, starting with v1.14 or later. The Windows-amd64 binaries for kubeadm, kubectl, kubelet, and kube-proxy can be found under the CHANGELOG link.
Networking Configuration
Once you have a Linux-based Kubernetes master node you are ready to choose a networking solution. This guide illustrates using Flannel in VXLAN mode for simplicity.
Configuring Flannel in VXLAN mode on the Linux controller
-
Prepare Kubernetes master for Flannel
Some minor preparation is recommended on the Kubernetes master in our cluster. It is recommended to enable bridged IPv4 traffic to iptables chains when using Flannel. This can be done using the following command:
sudo sysctl net.bridge.bridge-nf-call-iptables=1 -
Download & configure Flannel
Download the most recent Flannel manifest:
wget https://raw.githubusercontent.com/coreos/flannel/master/Documentation/kube-flannel.ymlThere are two sections you should modify to enable the vxlan networking backend:
After applying the steps below, the
net-conf.jsonsection ofkube-flannel.ymlshould look as follows:net-conf.json: | { "Network": "10.244.0.0/16", "Backend": { "Type": "vxlan", "VNI" : 4096, "Port": 4789 } }{{< note >}}The VNI must be set to 4096 and port 4789 for Flannel on Linux to interoperate with Flannel on Windows. Support for other VNIs is coming soon. See the VXLAN documentation for an explanation of these fields.{{< /note >}}
-
In the
net-conf.jsonsection of yourkube-flannel.yml, double-check:- The cluster subnet (e.g. "10.244.0.0/16") is set as per your IP plan.
- VNI 4096 is set in the backend
- Port 4789 is set in the backend
- In the
cni-conf.jsonsection of yourkube-flannel.yml, change the network name tovxlan0.
Your
cni-conf.jsonshould look as follows:cni-conf.json: | { "name": "vxlan0", "plugins": [ { "type": "flannel", "delegate": { "hairpinMode": true, "isDefaultGateway": true } }, { "type": "portmap", "capabilities": { "portMappings": true } } ] } - The cluster subnet (e.g. "10.244.0.0/16") is set as per your IP plan.
-
Apply the Flannel yaml and Validate
Let's apply the Flannel configuration:
kubectl apply -f kube-flannel.ymlAfter a few minutes, you should see all the pods as running if the Flannel pod network was deployed.
kubectl get pods --all-namespacesVerify that the Flannel DaemonSet has the NodeSelector applied.
kubectl get ds -n kube-system
Join Windows Worker
In this section we'll cover configuring a Windows node from scratch to join a cluster on-prem. If your cluster is on a cloud you'll likely want to follow the cloud specific guides in the next section.
Preparing a Windows Node
{{< note >}} All code snippets in Windows sections are to be run in a PowerShell environment with elevated permissions (Admin). {{< /note >}}
-
Install Docker (requires a system reboot)
Kubernetes uses Docker as its container engine, so we need to install it. You can follow the official Docs instructions, the Docker instructions, or try the following recommended steps:
Enable-WindowsOptionalFeature -FeatureName Containers Restart-Computer -Force Install-Module -Name DockerMsftProvider -Repository PSGallery -Force Install-Package -Name Docker -ProviderName DockerMsftProviderIf you are behind a proxy, the following PowerShell environment variables must be defined:
[Environment]::SetEnvironmentVariable("HTTP_PROXY", "http://proxy.example.com:80/", [EnvironmentVariableTarget]::Machine) [Environment]::SetEnvironmentVariable("HTTPS_PROXY", "http://proxy.example.com:443/", [EnvironmentVariableTarget]::Machine)If after reboot you see the following error, you need to restart the docker service manually
Start-Service docker{{< note >}} The "pause" (infrastructure) image is hosted on Microsoft Container Registry (MCR). You can access it using "docker pull mcr.microsoft.com/k8s/core/pause:1.2.0". The DOCKERFILE is available at https://github.com/kubernetes-sigs/sig-windows-tools/tree/master/cmd/wincat. {{< /note >}}
-
Prepare a Windows directory for Kubernetes
Create a "Kubernetes for Windows" directory to store Kubernetes binaries as well as any deployment scripts and config files.
mkdir c:\k -
Copy Kubernetes certificate
Copy the Kubernetes certificate file
$HOME/.kube/configfrom the Linux controller to this newC:\kdirectory on your Windows node.Tip: You can use tools such as xcopy, WinSCP, or this PowerShell wrapper for WinSCP to transfer the config file between nodes.
-
Download Kubernetes binaries
To be able to run Kubernetes, you first need to download the
kubeletandkube-proxybinaries. You download these from the Node Binaries links in the CHANGELOG.md file of the latest releases. For example 'kubernetes-node-windows-amd64.tar.gz'. You may also optionally downloadkubectlto run on Windows which you can find under Client Binaries.Use the Expand-Archive PowerShell command to extract the archive and place the binaries into
C:\k.
Join the Windows node to the Flannel cluster
The Flannel overlay deployment scripts and documentation are available in this repository. The following steps are a simple walkthrough of the more comprehensive instructions available there.
Download the Flannel start.ps1 script, the contents of which should be extracted to C:\k:
cd c:\k
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12
wget https://raw.githubusercontent.com/Microsoft/SDN/master/Kubernetes/flannel/start.ps1 -o c:\k\start.ps1
{{< note >}}
start.ps1 references install.ps1, which downloads additional files such as the flanneld executable and the Dockerfile for infrastructure pod and install those for you. For overlay networking mode, the firewall is opened for local UDP port 4789. There may be multiple powershell windows being opened/closed as well as a few seconds of network outage while the new external vSwitch for the pod network is being created the first time. Run the script using the arguments as specified below:
{{< /note >}}
.\start.ps1 -ManagementIP <Windows Node IP> -NetworkMode overlay -ClusterCIDR <Cluster CIDR> -ServiceCIDR <Service CIDR> -KubeDnsServiceIP <Kube-dns Service IP> -LogDir <Log directory>
| Parameter | Default Value | Notes |
|---|---|---|
| -ManagementIP | N/A (required) | The IP address assigned to the Windows node. You can use ipconfig to find this. |
| -NetworkMode | l2bridge | We're using overlay here |
| -ClusterCIDR | 10.244.0.0/16 | Refer to your cluster IP plan |
| -ServiceCIDR | 10.96.0.0/12 | Refer to your cluster IP plan |
| -KubeDnsServiceIP | 10.96.0.10 | |
| -InterfaceName | Ethernet | The name of the network interface of the Windows host. You can use ipconfig to find this. |
| -LogDir | C:\k | The directory where kubelet and kube-proxy logs are redirected into their respective output files. |
Now you can view the Windows nodes in your cluster by running the following:
kubectl get nodes
{{< note >}} You may want to configure your Windows node components like kubelet and kube-proxy to run as services. View the services and background processes section under troubleshooting for additional instructions. Once you are running the node components as services, collecting logs becomes an important part of troubleshooting. View the gathering logs section of the contributing guide for further instructions. {{< /note >}}
Public Cloud Providers
Azure
AKS-Engine can deploy a complete, customizable Kubernetes cluster with both Linux & Windows nodes. There is a step-by-step walkthrough available in the docs on GitHub.
GCP
Users can easily deploy a complete Kubernetes cluster on GCE following this step-by-step walkthrough on GitHub
Deployment with kubeadm and cluster API
Kubeadm is becoming the de facto standard for users to deploy a Kubernetes cluster. Windows node support in kubeadm will come in a future release. We are also making investments in cluster API to ensure Windows nodes are properly provisioned.
Next Steps
Now that you've configured a Windows worker in your cluster to run Windows containers you may want to add one or more Linux nodes as well to run Linux containers. You are now ready to schedule Windows containers on your cluster.
{{% /capture %}}


