зеркало из https://github.com/Azure/aks-engine.git
chore: Add windowsnodelabelsync.ps1 (#4163)
This commit is contained in:
Родитель
ab0729b8f8
Коммит
ad20028ea3
|
@ -0,0 +1,12 @@
|
|||
<#
|
||||
.DESCRIPTION
|
||||
This script is intended to sync customized and system-assigned Kubelet node labels.
|
||||
#>
|
||||
|
||||
$Global:ClusterConfiguration = ConvertFrom-Json ((Get-Content "c:\k\kubeclusterconfig.json" -ErrorAction Stop) | out-string)
|
||||
$Global:KubeletNodeLabels = $Global:ClusterConfiguration.Kubernetes.Kubelet.NodeLabels
|
||||
|
||||
$NodeLabels = $KubeletNodeLabels -split ","
|
||||
ForEach ($NodeLabel in $NodeLabels) {
|
||||
c:\k\kubectl.exe --kubeconfig=c:\k\config label node --overwrite $env:computername.ToLower() $NodeLabel
|
||||
}
|
Загрузка…
Ссылка в новой задаче