Skip to content

Remove flag "--allow-privileged" form start-kubelet.ps1 in Kubernetes 1.15 #379

@mrwonkerz

Description

@mrwonkerz

The start-kubelet.ps1 runs in the an error when using with kubernetes version 1.15
In Kubernetes 1.15 the flag "--allow-privileged" for kubelet is obsolete.

.\start-kubelet.ps1 -NetworkMode Overlay -KubeDnsServiceIP 10.96.0.10 -LogDir C:\k\Logs
Flag --enable-debugging-handlers has been deprecated, This parameter should be set via the config file specified by the Kubelet's --config flag. See https://kubernetes.io/docs/tasks/administer-cluster/kubelet-config-file/ for more information.
Usage:
  kubelet [flags]
...
F0709 11:25:37.135712    3088 server.go:156] unknown flag: --allow-privileged

The kubelet-Service can not be started because of this.
Removing the flag "--allow-privileged" from the start-kubelet.ps1 script fixes the issue.

$kubeletArgs = @(
    "--hostname-override=$(hostname)"
    "--v=6"
    "--pod-infra-container-image=mcr.microsoft.com/k8s/core/pause:1.0.0"
    "--enable-debugging-handlers"
#   "--allow-privileged=true"
    "--cluster-dns=$KubeDnsServiceIp"
    "--cluster-domain=cluster.local"
    "--kubeconfig=c:\k\config"
    "--hairpin-mode=promiscuous-bridge"
    "--image-pull-progress-deadline=20m"
    "--cgroups-per-qos=false"
    "--log-dir=$LogDir"
    "--logtostderr=false"
    "--enforce-node-allocatable="""
    "--network-plugin=cni"
    "--cni-bin-dir="c:\k\cni""
    "--cni-conf-dir="c:\k\cni\config""
    "--node-ip=$(Get-MgmtIpAddress)"
)
if ($KubeletFeatureGates -ne "")
{
    $kubeletArgs += "--feature-gat

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions