6

Running metric-server on Kind Kubernetes

 8 months ago
source link: https://gist.github.com/sanketsudake/a089e691286bf2189bfedf295222bd43
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
neoserver,ios ssh client

Running metric-server on Kind Kubernetes · GitHub

Instantly share code, notes, and snippets.

Running metric-server on Kind Kubernetes

I have created a local Kubernetes cluster with kind. Following are changes you need to get metric-server running on Kind.

Deploy latest metric-server release.

kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.5.0/components.yaml

Within existing arguments to metric-server container, you need to add argument --kubelet-insecure-tls.

You can create file metric-server-patch.yaml with following content,

spec:
  template:
    spec:
      containers:
      - args:
        - --cert-dir=/tmp
        - --secure-port=443
        - --kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname
        - --kubelet-use-node-status-port
        - --metric-resolution=15s
        - --kubelet-insecure-tls
        name: metrics-server

NOTE: If you are using metric-server latest release above 0.5.0, it's possible container arguments may change. You should get existing arguments to container and just add --kubelet-insecure-tls argument to get patch.

Patch metric-server deployment,

kubectl patch deployment metrics-server -n kube-system --patch "$(cat metric-server-patch.yaml)"

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK