|
1 | 1 | # Metrics Server |
2 | 2 |
|
3 | | -<a href="https://slsa.dev/spec/v0.1/levels"><img src="https://slsa.dev/images/gh-badge-level3.svg" alt="The SLSA Level 3 badge"></a> |
| 3 | + |
| 4 | + |
| 5 | +[](https://slsa.dev/spec/v0.1/levels) |
| 6 | +[](https://opensource.org/licenses/Apache-2.0) |
| 7 | +[](https://twitter.com/kadrasIO) |
4 | 8 |
|
5 | | -This project provides a [Carvel package](https://carvel.dev/kapp-controller/docs/latest/packaging) for [Metrics Server](https://github.com/kubernetes-sigs/metrics-server), a scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines. |
| 9 | +A Carvel package for [Metrics Server](https://github.com/kubernetes-sigs/metrics-server), a scalable and efficient source of container resource metrics for Kubernetes built-in autoscaling pipelines. |
6 | 10 |
|
7 | | -## Prerequisites |
| 11 | +## 🚀 Getting Started |
| 12 | + |
| 13 | +### Prerequisites |
8 | 14 |
|
9 | 15 | * Kubernetes 1.24+ |
10 | 16 | * Carvel [`kctrl`](https://carvel.dev/kapp-controller/docs/latest/install/#installing-kapp-controller-cli-kctrl) CLI. |
11 | 17 | * Carvel [kapp-controller](https://carvel.dev/kapp-controller) deployed in your Kubernetes cluster. You can install it with Carvel [`kapp`](https://carvel.dev/kapp/docs/latest/install) (recommended choice) or `kubectl`. |
12 | 18 |
|
13 | 19 | ```shell |
14 | 20 | kapp deploy -a kapp-controller -y \ |
15 | | - -f https://github.com/vmware-tanzu/carvel-kapp-controller/releases/latest/download/release.yml |
| 21 | + -f https://github.com/carvel-dev/kapp-controller/releases/latest/download/release.yml |
16 | 22 | ``` |
17 | 23 |
|
18 | | -## Installation |
| 24 | +### Installation |
19 | 25 |
|
20 | | -First, add the [Kadras package repository](https://github.com/kadras-io/kadras-packages) to your Kubernetes cluster. |
| 26 | +Add the Kadras [package repository](https://github.com/kadras-io/kadras-packages) to your Kubernetes cluster: |
21 | 27 |
|
22 | 28 | ```shell |
23 | 29 | kubectl create namespace kadras-packages |
24 | | - kctrl package repository add -r kadras-repo \ |
| 30 | + kctrl package repository add -r kadras-packages \ |
25 | 31 | --url ghcr.io/kadras-io/kadras-packages \ |
26 | 32 | -n kadras-packages |
27 | 33 | ``` |
28 | 34 |
|
29 | | -Then, install the Metrics Server package. |
| 35 | +<details><summary>Installation without package repository</summary> |
| 36 | +The recommended way of installing the Metrics Server package is via the Kadras <a href="https://github.com/kadras-io/kadras-packages">package repository</a>. If you prefer not using the repository, you can add the package definition directly using <a href="https://carvel.dev/kapp/docs/latest/install"><code>kapp</code></a> or <code>kubectl</code>. |
30 | 37 |
|
31 | 38 | ```shell |
32 | | - kctrl package install -i metrics-server \ |
33 | | - -p metrics-server.packages.kadras.io \ |
34 | | - -v 0.6.2+kadras.1 \ |
35 | | - -n kadras-packages |
| 39 | + kubectl create namespace kadras-packages |
| 40 | + kapp deploy -a metrics-server-package -n kadras-packages -y \ |
| 41 | + -f https://github.com/kadras-io/package-for-metrics-server/releases/latest/download/metadata.yml \ |
| 42 | + -f https://github.com/kadras-io/package-for-metrics-server/releases/latest/download/package.yml |
36 | 43 | ``` |
| 44 | +</details> |
37 | 45 |
|
38 | | -### Verification |
39 | | - |
40 | | -You can verify the list of installed Carvel packages and their status. |
| 46 | +Install the Metrics Server package: |
41 | 47 |
|
42 | 48 | ```shell |
43 | | - kctrl package installed list -n kadras-packages |
| 49 | + kctrl package install -i metrics-server \ |
| 50 | + -p metrics-server.packages.kadras.io \ |
| 51 | + -v ${VERSION} \ |
| 52 | + -n kadras-packages |
44 | 53 | ``` |
45 | 54 |
|
46 | | -### Version |
| 55 | +> **Note** |
| 56 | +> You can find the `${VERSION}` value by retrieving the list of package versions available in the Kadras package repository installed on your cluster. |
| 57 | +> |
| 58 | +> ```shell |
| 59 | +> kctrl package available list -p metrics-server.packages.kadras.io -n kadras-packages |
| 60 | +> ``` |
47 | 61 |
|
48 | | -You can get the list of Metrics Server versions available in the Kadras package repository. |
| 62 | +Verify the installed packages and their status: |
49 | 63 |
|
50 | 64 | ```shell |
51 | | - kctrl package available list -p metrics-server.packages.kadras.io -n kadras-packages |
| 65 | + kctrl package installed list -n kadras-packages |
52 | 66 | ``` |
53 | 67 |
|
54 | | -## Configuration |
| 68 | +## 📙 Documentation |
55 | 69 |
|
56 | | -The Metrics Server package has the following configurable properties. |
| 70 | +Documentation, tutorials and examples for this package are available in the [docs](docs) folder. |
| 71 | +For documentation specific to Metrics Server, check out [github.com/kubernetes-sigs/metrics-server](https://github.com/kubernetes-sigs/metrics-server). |
57 | 72 |
|
58 | | -| Value | Required/Optional | Description | |
59 | | -|-------|-------------------|-------------| |
60 | | -| `metricsServer.createNamespace` | Optional | Whether to create namespace specified for metrics-server. Default value is `true`. | |
61 | | -| `metricsServer.namespace` | Optional | The namespace value used by older templates, will be overwriten if top level namespace is present, kept for backward compatibility. Default value is `null`. | |
62 | | -| `metricsServer.config.securePort` | Optional | TThe HTTPS secure port used by metrics-server. Default: `4443`. | |
63 | | -| `metricsServer.config.updateStrategy` | Optional | TThe update strategy of the metrics-server deployment. Default: `RollingUpdate` | |
64 | | -| `metricsServer.config.probe.failureThreshold` | Optional | Probe failureThreshold of metrics-server deployment. Default: `3`. | |
65 | | -| `metricsServer.config.probe.periodSeconds` | Optional | Probe period of metrics-server deployment. Default: `10` . | |
66 | | -| `metricsServer.config.apiServiceInsecureTLS`| Optional | Whether to enable insecure TLS for metrics-server api service. Default: `True`. | |
| 73 | +## 🎯 Configuration |
67 | 74 |
|
68 | | -You can define your configuration in a `values.yml` file. |
| 75 | +The Metrics Server package can be customized via a `values.yml` file. |
69 | 76 |
|
70 | 77 | ```yaml |
71 | 78 | metricsServer: |
72 | 79 | config: |
73 | 80 | securePort: 4443 |
74 | 81 | ``` |
75 | 82 |
|
76 | | -Then, reference it from the `kctrl` command when installing or upgrading the package. |
| 83 | +Reference the `values.yml` file from the `kctrl` command when installing or upgrading the package. |
77 | 84 |
|
78 | 85 | ```shell |
79 | 86 | kctrl package install -i metrics-server \ |
80 | 87 | -p metrics-server.packages.kadras.io \ |
81 | | - -v 0.6.2+kadras.1 \ |
| 88 | + -v ${VERSION} \ |
82 | 89 | -n kadras-packages \ |
83 | 90 | --values-file values.yml |
84 | 91 | ``` |
85 | 92 |
|
86 | | -## Upgrading |
87 | | - |
88 | | -You can upgrade an existing package to a newer version using `kctrl`. |
| 93 | +### Values |
89 | 94 |
|
90 | | - ```shell |
91 | | - kctrl package installed update -i metrics-server \ |
92 | | - -v <new-version> \ |
93 | | - -n kadras-packages |
94 | | - ``` |
95 | | - |
96 | | -You can also update an existing package with a newer `values.yml` file. |
97 | | - |
98 | | - ```shell |
99 | | - kctrl package installed update -i metrics-server \ |
100 | | - -n kadras-packages \ |
101 | | - --values-file values.yml |
102 | | - ``` |
103 | | - |
104 | | -## Other |
| 95 | +The Metrics Server package has the following configurable properties. |
105 | 96 |
|
106 | | -The recommended way of installing the Metrics Server package is via the [Kadras package repository](https://github.com/kadras-io/kadras-packages). If you prefer not using the repository, you can install the package by creating the necessary Carvel `PackageMetadata` and `Package` resources directly using [`kapp`](https://carvel.dev/kapp/docs/latest/install) or `kubectl`. |
| 97 | +<details><summary>Configurable properties</summary> |
107 | 98 |
|
108 | | - ```shell |
109 | | - kubectl create namespace kadras-packages |
110 | | - kapp deploy -a metrics-server-package -n kadras-packages -y \ |
111 | | - -f https://github.com/kadras-io/package-for-metrics-server/releases/latest/download/metadata.yml \ |
112 | | - -f https://github.com/kadras-io/package-for-metrics-server/releases/latest/download/package.yml |
113 | | - ``` |
| 99 | +| Value | Required/Optional | Description | |
| 100 | +|-------|-------------------|-------------| |
| 101 | +| `metricsServer.createNamespace` | Optional | Whether to create namespace specified for metrics-server. Default value is `true`. | |
| 102 | +| `metricsServer.namespace` | Optional | The namespace value used by older templates, will be overwriten if top level namespace is present, kept for backward compatibility. Default value is `null`. | |
| 103 | +| `metricsServer.config.securePort` | Optional | TThe HTTPS secure port used by metrics-server. Default: `4443`. | |
| 104 | +| `metricsServer.config.updateStrategy` | Optional | TThe update strategy of the metrics-server deployment. Default: `RollingUpdate` | |
| 105 | +| `metricsServer.config.probe.failureThreshold` | Optional | Probe failureThreshold of metrics-server deployment. Default: `3`. | |
| 106 | +| `metricsServer.config.probe.periodSeconds` | Optional | Probe period of metrics-server deployment. Default: `10` . | |
| 107 | +| `metricsServer.config.apiServiceInsecureTLS`| Optional | Whether to enable insecure TLS for metrics-server api service. Default: `True`. | |
114 | 108 |
|
115 | | -## Support and Documentation |
| 109 | +</details> |
116 | 110 |
|
117 | | -For support and documentation specific to Metrics Server, check out [https://github.com/kubernetes-sigs/metrics-server](https://github.com/kubernetes-sigs/metrics-server). |
| 111 | +## 🛡️ Security |
118 | 112 |
|
119 | | -## References |
| 113 | +The security process for reporting vulnerabilities is described in [SECURITY.md](SECURITY.md). |
120 | 114 |
|
121 | | -This package is based on the original Metrics Server package used in [Tanzu Community Edition](https://github.com/vmware-tanzu/community-edition) before its retirement. |
| 115 | +## 🖊️ License |
122 | 116 |
|
123 | | -## Supply Chain Security |
| 117 | +This project is licensed under the **Apache License 2.0**. See [LICENSE](LICENSE) for more information. |
124 | 118 |
|
125 | | -This project is compliant with level 3 of the [SLSA Framework](https://slsa.dev). |
| 119 | +## 🙏 Acknowledgments |
126 | 120 |
|
127 | | -<img src="https://slsa.dev/images/SLSA-Badge-full-level3.svg" alt="The SLSA Level 3 badge" width=200> |
| 121 | +This package is inspired by the original kpack package used in the [Tanzu Community Edition](https://github.com/vmware-tanzu/community-edition) project before its retirement. |
0 commit comments