Kubernetes Metrics Server Operations: Difference between revisions
Jump to navigation
Jump to search
Line 62: | Line 62: | ||
Cloned the repository then built the chart locally with 'helm package ./metrics-server'. Then installed with: | Cloned the repository then built the chart locally with 'helm package ./metrics-server'. Then installed with: | ||
<syntaxhighlight lang='bash'> | <syntaxhighlight lang='bash'> | ||
helm install ms ./metrics-server-2.11.2.tgz -f ./ | helm install ms ./metrics-server-2.11.2.tgz -f ./values.yaml | ||
</syntaxhighlight> | </syntaxhighlight> | ||
where | where values.yaml: | ||
<syntaxhighlight lang='yaml'> | <syntaxhighlight lang='yaml'> | ||
image: | image: |
Revision as of 02:55, 7 October 2020
External
Internal
Help
docker run --rm k8s.gcr.io/metrics-server/metrics-server:v0.3.7 --help
Installation
With Manifest
Docker Desktop Kubernetes
Install
kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.3.7/components.yaml
If configuration needs to be changed, pull the file locally and install it with:
kubectl apply -f ./components.yaml
clusterrole.rbac.authorization.k8s.io/system:aggregated-metrics-reader created
clusterrolebinding.rbac.authorization.k8s.io/metrics-server:system:auth-delegator created
rolebinding.rbac.authorization.k8s.io/metrics-server-auth-reader created
apiservice.apiregistration.k8s.io/v1beta1.metrics.k8s.io created
serviceaccount/metrics-server created
deployment.apps/metrics-server created
service/metrics-server created
clusterrole.rbac.authorization.k8s.io/system:metrics-server created
clusterrolebinding.rbac.authorization.k8s.io/system:metrics-server created
It is deployed in the 'kube-system' namespace.
Configuration
For Docker Desktop Kubernetes, add "--kubelet-insecure-tls", otherwise the pod reads will fail with:
x509: certificate signed by unknown authority
kind: Deployment
metadata:
name: metrics-server
spec:
template:
spec:
containers:
- name: metrics-server
args:
- --kubelet-insecure-tls
- --cert-dir=/tmp
- --secure-port=4443
Uninstall
Uninstall all the Kubernetes API resources. To reconfigure, it is sufficient to uninstall then re-install the deployment.
EKS
With Helm
Cloned the repository then built the chart locally with 'helm package ./metrics-server'. Then installed with:
helm install ms ./metrics-server-2.11.2.tgz -f ./values.yaml
where values.yaml:
image:
repository: k8s.gcr.io/metrics-server/metrics-server
tag: v0.3.7
args:
- --kubelet-insecure-tls
- --cert-dir=/tmp