kubernetes-sigs/cluster-api

CoreDNS pods running on the same Node after initial cluster creation

開放

#9,639 建立於 2023年10月30日

 (17 則留言) (2 個反應) (0 位負責人)Go (1,532 個分叉)auto 404
area/provider/control-plane-kubeadmhelp wantedkind/featurepriority/important-longtermtriage/accepted

倉庫指標

星標
 (4,267 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

After a cluster with multiple control plane nodes is created all CoreDNS replicas are running on the same Node. Ideally they should be distributed across multiple nodes

Details

The kubeadm bootstrap provider is using kubeadm to deploy CoreDNS. It creates the CoreDNS deployment with preferredDuringSchedulingIgnoredDuringExecution. Because at the time of CoreDNS deployment there is only one Node all CoreDNS pods are scheduled on the same Node. There is no re-scheduling once additional CP nodes are added.

Related kubeadm issues, let's take a look!

Some idea on how to solve this

  1. Change preferredDuringSchedulingIgnoredDuringExecution to requiredDuringSchedulingIgnoredDuringExecution for multi-CP control planes (also change it back during scale down to 1 replica)
    1. we should check if replica is always the same number (e.g. 2)
  2. Delete CoreDNS Pods as soon as additional CP replicas join

貢獻者指南