Skip to content

NimTechnology

Trình bày các công nghệ CLOUD một cách dễ hiểu.

  • Kubernetes & Container
    • Docker
    • Kubernetes
      • Ingress
      • Pod
    • Helm Chart
    • OAuth2 Proxy
    • Isito-EnvoyFilter
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Vault
    • Longhorn – Storage
    • VictoriaMetrics
    • MetalLB
    • Kong Gateway
  • CI/CD
    • ArgoCD
    • ArgoWorkflows
    • Argo Events
    • Spinnaker
    • Jenkins
    • Harbor
    • TeamCity
    • Git
      • Bitbucket
  • Coding
    • DevSecOps
    • Terraform
      • GCP – Google Cloud
      • AWS – Amazon Web Service
      • Azure Cloud
    • Golang
    • Laravel
    • Python
    • Jquery & JavaScript
    • Selenium
  • Log, Monitor & Tracing
    • DataDog
    • Prometheus
    • Grafana
    • ELK
      • Kibana
      • Logstash
  • BareMetal
    • NextCloud
  • Toggle search form

[EKS windows] Using EKS terraform module to install K8S windows with manage node Group mode.

Posted on March 25, 2024March 27, 2024 By nim No Comments on [EKS windows] Using EKS terraform module to install K8S windows with manage node Group mode.

Contents

Toggle
  • 1) Overview!
  • On EKS Windows, windows pods can not resolve any domains.
    • Check the inbound Security Group.
    • Re-check IAM access entries and aws-auth config map in K8S
  • Windows pods are assigned IPs.
  • User Data of Windows nodes:
  • EKS windows with Manage node Group:

1) Overview!

Trước đây để cài eks windows hay là k8s windows trên aws chúng ta sẽ lựa chọn mode self managed node Group. Bạn có thể tham khảo ở đây: https://nimtechnology.com/2022/09/25/aws-creating-eks-windows-on-aws-and-running-windows-pods/

Hiện tại có 1 tin là terraform module đã Native support for Windows based managed nodegroups similar to AL2 and Bottlerocket
https://github.com/terraform-aws-modules/terraform-aws-eks/releases/tag/v20.0.0

Bạn có thể tham khoa template terraform để provisioning eks windows:
https://github.com/mrnim94/terraform-aws-eks-windows/blob/issue/can-not-assign-ip-to-windows-pods/c3-02-eks.tf

On EKS Windows, windows pods can not resolve any domains.

Check the inbound Security Group.

Nếu bạn gặp trường hợp là pod trên windows không thể phân giải được bất cứ domain nào thì chúng ta inspect từng bước nhé

Trong Autoscaling Group chúng ta đang có 3 groups.

Đây là con windows instance:

Windows instance đang sử dụng Security Group là: sg-02fa761d49826d86d

Đầu tiên cần test là windows pod có kết nối được đến service IP của coredns chưa nhé.

Nếu rồi thì chúng ta sẽ cần kiểm tra Security Group:

Bạn sẽ cần kiểm tra giúp mình cái Aditional Security Group:

Nếu bạn tìm Aditional Security Group thì nó sẽ hiện 2 SecGroup luôn nhé!
Bạn sẽ đi vào SecGroup mà to be like: xxxx-node và Description của nó là: EKS node shared security group

Thường nó nó sẽ là Security Group đang được apply cho Linux Node.

Bạn có thể hiểu như hình:
Và mình đã chọn 1 các dễ dàng là allow all traffic luôn

Tóm lại là bạn sẽ cần cấu hình trong Aditional Security Group cho phép các con windows connect thông qua các điều kiện sau:
protocol: ALL TCP and UDP.
Range port: all port
Source: Security Group is attached to Windows instances, VPC cidr, or subnet cidr.

Re-check IAM access entries and aws-auth config map in K8S

Bạn cần kiêm tra access entries thì ARN windows -> Group name: is there the "eks:kube-proxy-windows"

và config map của k8s có tương ứng như vậy không?

https://docs.aws.amazon.com/eks/latest/userguide/windows-support.html

Windows pods are assigned IPs.

Đầu tiên bạn cần check là các on pod hay deployment, ect đã được attached “” No selector Windows hay chưa?

      dnsPolicy: ClusterFirst
########################
      nodeSelector:
        kubernetes.io/os: windows
##############################
      priorityClassName: system-node-critical

enable-windows-ipam: “true” is declared in amazon-vpc-cni ConfigMap?

apiVersion: v1
kind: ConfigMap
metadata:
  name: amazon-vpc-cni
  namespace: kube-system
data:
  enable-windows-ipam: "true"

User Data of Windows nodes:

I see that terraform-aws-eks creates use_data based on my pre_bootstrap_user_data.
Next, it is merged with any user_data(*) that has a configuration to access the EKS controller created by EKS controller AWS.

Windows user data uses PowerShell commands. When creating a managed node group, your custom user data combines with Amazon EKS managed user data. Your PowerShell commands come first, followed by the managed user data commands, all within one <powershell></powershell> tag.

When no AMI ID is specified in the launch template, don’t use the Windows Amazon EKS Bootstrap script in user data to configure Amazon EKS.

Example user data is as follows.

<powershell>
Write-Host "Running custom user data script"
</powershell>

refer to:
https://docs.aws.amazon.com/eks/latest/userguide/launch-templates.html#launch-template-user-data

EKS windows with Manage node Group:

Bạn có thể sử dụng module eks-windows with version greater 3.0.5

AWS - Amazon Web Service

Post navigation

Previous Post: [EKS] operation error EKS: CreateAccessEntry, https response error StatusCode: 409
Next Post: [Grafana] Draw table visualization in Grafana

More Related Articles

[Metrics Server] Install metrics-server on Kubernetes. AWS - Amazon Web Service
[Terraform] – Terraform Beginner – Lesson 4: Remote State AWS - Amazon Web Service
[AWS] EKS IAM Roles for Service Accounts (IRSA) using Terraform AWS - Amazon Web Service
[AWS/EKS] EFS CSI Driver – Create Persistent Volume Clain with ReadWriteMany type on EKS AWS - Amazon Web Service
[EKS/IPs] Increase most many IPs as possible on each Node of your EKS. AWS - Amazon Web Service
[AWS] Configure Ingress SSL and SSL Redirect on Load Balancer Controller AWS - Amazon Web Service

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Tham Gia Group DevOps nhé!
Để Nim có nhiều động lực ra nhiều bài viết.
Để nhận được những thông báo mới nhất.

Recent Posts

  • [WordPress] Hướng dấn gửi mail trên WordPress thông qua gmail. June 15, 2025
  • [Bitbucket] Git Clone/Pull/Push with Bitbucket through API Token. June 12, 2025
  • [Teamcity] How to transfer the value from pipeline A to pipeline B June 9, 2025
  • [Windows] Remove the process that consumes too much CPU. June 3, 2025
  • Deploying Web-Based File Managers: File Browser and KubeFileBrowser with Docker and Kubernetes June 3, 2025

Archives

  • June 2025
  • May 2025
  • April 2025
  • March 2025
  • February 2025
  • January 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • July 2024
  • June 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
  • July 2022
  • June 2022
  • May 2022
  • April 2022
  • March 2022
  • February 2022
  • January 2022
  • December 2021
  • November 2021
  • October 2021
  • September 2021
  • August 2021
  • July 2021
  • June 2021

Categories

  • BareMetal
    • NextCloud
  • CI/CD
    • Argo Events
    • ArgoCD
    • ArgoWorkflows
    • Git
      • Bitbucket
    • Harbor
    • Jenkins
    • Spinnaker
    • TeamCity
  • Coding
    • DevSecOps
    • Golang
    • Jquery & JavaScript
    • Laravel
    • NextJS 14 & ReactJS & Type Script
    • Python
    • Selenium
    • Terraform
      • AWS – Amazon Web Service
      • Azure Cloud
      • GCP – Google Cloud
  • Kubernetes & Container
    • Apache Kafka
      • Kafka
      • Kafka Connect
      • Lenses
    • Docker
    • Helm Chart
    • Isito-EnvoyFilter
    • Kong Gateway
    • Kubernetes
      • Ingress
      • Pod
    • Longhorn – Storage
    • MetalLB
    • OAuth2 Proxy
    • Vault
    • VictoriaMetrics
  • Log, Monitor & Tracing
    • DataDog
    • ELK
      • Kibana
      • Logstash
    • Fluent
    • Grafana
    • Prometheus
  • Uncategorized
  • Admin

Copyright © 2025 NimTechnology.