A Carvel package for Metrics Server, a scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines.
-
Kubernetes 1.33+
-
Carvel
kctrlCLI. -
Carvel kapp-controller deployed in your Kubernetes cluster. You can install it with Carvel
kapp(recommended choice) orkubectl.kapp deploy -a kapp-controller -y \ -f https://github.com/carvel-dev/kapp-controller/releases/latest/download/release.yml
Add the Kadras package repository to your Kubernetes cluster:
kctrl package repository add -r kadras-packages \
--url ghcr.io/kadras-io/kadras-packages \
-n kadras-system --create-namespaceInstallation without package repository
The recommended way of installing the Metrics Server package is via the Kadras package repository. If you prefer not using the repository, you can add the package definition directly usingkapp or kubectl.
kubectl create namespace kadras-system
kapp deploy -a metrics-server-package -n kadras-system -y \
-f https://github.com/kadras-io/package-for-metrics-server/releases/latest/download/metadata.yml \
-f https://github.com/kadras-io/package-for-metrics-server/releases/latest/download/package.ymlInstall the Metrics Server package:
kctrl package install -i metrics-server \
-p metrics-server.packages.kadras.io \
-v ${VERSION} \
-n kadras-systemNote You can find the
${VERSION}value by retrieving the list of package versions available in the Kadras package repository installed on your cluster.kctrl package available list -p metrics-server.packages.kadras.io -n kadras-system
Verify the installed packages and their status:
kctrl package installed list -n kadras-systemDocumentation, tutorials and examples for this package are available in the docs folder. For documentation specific to Metrics Server, check out github.com/kubernetes-sigs/metrics-server.
The Metrics Server package can be customized via a values.yml file.
metricsServer:
config:
securePort: 4443Reference the values.yml file from the kctrl command when installing or upgrading the package.
kctrl package install -i metrics-server \
-p metrics-server.packages.kadras.io \
-v ${VERSION} \
-n kadras-system \
--values-file values.ymlThe Metrics Server package has the following configurable properties.
Configurable properties
| Value | Required/Optional | Description |
|---|---|---|
namespace |
Optional | The namespace in which metrics-server is deployed. Default: kube-system. |
nodeSelector |
Optional | NodeSelector configuration applied to all the deployments. |
deployment.updateStrategy |
Optional | Update strategy of deployments. Default: null. |
deployment.rollingUpdate.maxUnavailable |
Optional | The maxUnavailable of rollingUpdate. Applied only if RollingUpdate is used as updateStrategy. Default: 1. |
deployment.rollingUpdate.maxSurge |
Optional | The maxSurge of rollingUpdate. Applied only if RollingUpdate is used as updateStrategy. Default: 0. |
daemonset.updateStrategy |
Optional | Update strategy of daemonsets. Default: null. |
metricsServer.namespace |
Optional | The namespace value used by older templates, will be overwriten if top level namespace is present, kept for backward compatibility. Default: kube-system. |
metricsServer.createNamespace |
Optional | Whether to create namespace specified for metrics-server. Default: true. |
metricsServer.config.securePort |
Optional | The HTTPS secure port used by metrics-server. Default: 4443. |
metricsServer.config.updateStrategy |
Optional | The update strategy of the metrics-server deployment. Default: RollingUpdate. |
metricsServer.config.args |
Optional | Arguments passed into metrics-server container. Default: [""]. |
metricsServer.config.probe.failureThreshold |
Optional | Probe failureThreshold of metrics-server deployment. Default: 3. |
metricsServer.config.probe.periodSeconds |
Optional | Probe period of metrics-server deployment. Default: 10. |
metricsServer.config.apiServiceInsecureTLS |
Optional | Whether to enable insecure TLS for metrics-server api service. Default: true. |
metricsServer.config.tolerations |
Optional | Metrics-server deployment tolerations. Default: []. |
The security process for reporting vulnerabilities is described in SECURITY.md.
This project is licensed under the Apache License 2.0. See LICENSE for more information.
This package is inspired by the original metrics-server package used in the Tanzu Community Edition project before its retirement.