{"id":16970248,"url":"https://github.com/wi2l/kubectl-vpa-recommendation","last_synced_at":"2025-03-22T14:31:18.757Z","repository":{"id":41094854,"uuid":"446926798","full_name":"wI2L/kubectl-vpa-recommendation","owner":"wI2L","description":"kubectl plugin to compare VPA recommendations to actual resources requests","archived":false,"fork":false,"pushed_at":"2023-08-24T09:03:31.000Z","size":763,"stargazers_count":37,"open_issues_count":2,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-18T12:01:58.275Z","etag":null,"topics":["autoscaling","kubectl","kubectl-plugin","kubectl-plugins","verticalpodautoscaler","vpa"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wI2L.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2022-01-11T17:56:23.000Z","updated_at":"2025-02-23T16:57:34.000Z","dependencies_parsed_at":"2024-10-28T13:22:09.420Z","dependency_job_id":"f03c756c-6d4b-4d3f-af73-edeb97da6351","html_url":"https://github.com/wI2L/kubectl-vpa-recommendation","commit_stats":null,"previous_names":["wi2l/kubectl-commitment"],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wI2L%2Fkubectl-vpa-recommendation","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wI2L%2Fkubectl-vpa-recommendation/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wI2L%2Fkubectl-vpa-recommendation/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wI2L%2Fkubectl-vpa-recommendation/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wI2L","download_url":"https://codeload.github.com/wI2L/kubectl-vpa-recommendation/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":244971922,"owners_count":20540889,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["autoscaling","kubectl","kubectl-plugin","kubectl-plugins","verticalpodautoscaler","vpa"],"created_at":"2024-10-14T00:27:47.002Z","updated_at":"2025-03-22T14:31:18.752Z","avatar_url":"https://github.com/wI2L.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# kubectl vpa-recommendation\n\n\u003cp align=\"left\"\u003e\n    \u003ca href=\"https://github.com/wI2L/kubectl-vpa-recommendation/actions\"\u003e\u003cimg src=\"https://github.com/wI2L/kubectl-vpa-recommendation/workflows/ci/badge.svg\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://goreportcard.com/report/github.com/wI2L/kubectl-vpa-recommendation\"\u003e\u003cimg src=\"https://goreportcard.com/badge/github.com/wI2L/kubectl-vpa-recommendation\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://github.com/wI2L/kubectl-vpa-recommendation/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/tag/wI2L/kubectl-vpa-recommendation?color=blueviolet\u0026label=release\u0026sort=semver\"\u003e\u003c/a\u003e\n    \u003ca href=\"https://codecov.io/gh/wI2L/kubectl-vpa-recommendation\"\u003e\u003cimg src=\"https://codecov.io/gh/wI2L/kubectl-vpa-recommendation/branch/master/graph/badge.svg?token=UTD8CW2ZS2\"/\u003e\u003c/a\u003e\n    \u003ca href=\"LICENSE\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg\"\u003e\u003c/a\u003e\n\u003c/p\u003e\n\nA `kubectl` plugin to show the differences between the recommendations of a `VerticalPodAutoscaler` and the actual resources requests of the targeted controller's pod(s).\n\nThe plugin is compatible with Kubernetes servers starting from version 1.16, which have the `autoscaling.k8s.io/v1` API group installed. See the other [prerequisites](https://github.com/kubernetes/autoscaler/tree/master/vertical-pod-autoscaler#prerequisites) for using VPAs on your cluster.\n\n## Installation\n\n### With [Krew](https://krew.sigs.k8s.io/)\n\nFollow these [instructions](https://krew.sigs.k8s.io/docs/user-guide/quickstart/) to install `krew`. Then run the following commands:\n\n```shell\n$ kubectl krew install vpa-recommendation\n$ kubectl vpa-recommendation --help\n```\n\n### Manual download\n\nHead to the [releases](https://github.com/wI2L/kubectl-vpa-recommendation/releases) page to download an existing release for your OS/arch, and add the path to the binary to your `$PATH`.\n\n### Build from source\n\n:warning: The plugin requires [Go 1.17+](https://golang.org/doc/install) to build.\n\nTo build the plugin yourself from the source, use the following commands:\n\n```shell\n$ git clone git@github.com:wI2L/kubectl-vpa-recommendation.git\n$ cd kubectl-vpa-recommendation\n$ make build\n```\n\nIt creates a single binary file for the host machine platform/architecture in the `dist/` folder. Move it somewhere within your `$PATH`, such as `$GOPATH/bin`. You can then invoke it directly (`kubectl-vpa-recommendation`), or via `kubectl` (`kubectl vpa-recommendation`).\n\n## Usage\n\n### How to interpret the output?\n\nThe columns `% CPU DIFF` and `% MEMORY DIFF` represents the percentage of increase/decrease for the request in terms of the recommendation.\n\nFor example, if a request value is set to 4 CPU (`4000m`), and the recommendation is only 1 CPU (`1000m`), the difference printed is `+300%`. On the contrary, if the request (`125m`) is lower than the recommendation (`250m`), the difference is then `-50%`. As a rule of thumb, you can think of positive values as *over commitment*  and negative values as *under commitment*.\n\n### Demo\n\nThe following examples were produced from a brand-new Kubernetes cluster created with [`k3d`](https://k3d.io/v5.2.2/). The `VerticalPodAutoscaler` resources were automatically created by the [`goldilocks`](https://github.com/FairwindsOps/goldilocks) operator.\n\n#### Single namespace\n\n![example1](assets/example1.png)\n\n#### Wide output (all namespaces)\n\n![example2](assets/example2.png)\n\n### Options\n\nApart from the flags defined by the [`genericclioptions`](https://pkg.go.dev/k8s.io/cli-runtime/pkg/genericclioptions) package and some [logging flags](https://github.com/kubernetes/enhancements/tree/master/keps/sig-instrumentation/2845-deprecate-klog-specific-flags-in-k8s-components), the following options are available with the plugin:\n- `--all-namespaces`, `-A`: List `VerticalPodAutoscaler` resources in all namespaces\n- `--critical-threshold`: Critical threshold of percentage difference for colored output. Default to `50`\n- `--namespace`, `-n`: If present, the namespace scope for the request\n- `--no-colors`: Do not use colors to highlight increase/decrease percentage values\n- `--no-headers`: Do not print table headers\n- `--output`, `-o`: Output format. One of: `wide` | `split` | `split-wide`\n- `--recommendation-type`: The type of recommendation to use in comparisons. One of: `lower-bound`, `target`, `uncapped-target`, `upper-bound`. Default to `target`\n    - see [`RecommendedContainerResources`](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/pkg/apis/autoscaling.k8s.io/v1/types.go#L245) for more details about the fields represented by each value\n- `--show-containers`, `-c`: Display containers recommendations for each `VerticalPodAutoscaler` resource\n- `--show-kind`, `-k`: Show the resource type for the requested object(s) and their target\n- `--show-namespace`: Show resource namespace as the first column\n- `--sort-columns`: Comma-separated list of column names for sorting the table. Any of: `cpu-diff` | `cpu-rec` | `cpu-req` | `mem-diff` | `mem-rec` | `mem-req` | `name` | `namespace` | `target`. Default to `namespace,name`\n- `--sort-order`: The sort order of the table columns. Either `asc` or `desc`. Default to `asc`\n- `--warning-threshold`: Warning threshold of percentage difference for colored output. Default to `20`\n\nTo view the full list of available options, use the following command:\n\n```shell\n$ kubectl vpa-recommendation --help\n```\n\n## Limitations\n\n- Unlike the [official VPA recommender](https://github.com/kubernetes/autoscaler/blob/master/vertical-pod-autoscaler/pkg/recommender/README.md), which is fully generic and handle any kind of \"scalable\" resources, the plugin recognize only some *well-known* controllers such as: `CronJob`, `DaemonSet`, `Deployment`, `Job`, `ReplicaSet`, `ReplicationController`, `StatefulSet`.\n\n## License\n\nThis plugin is licensed under the **MIT** license. See the [LICENSE](LICENSE) file.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwi2l%2Fkubectl-vpa-recommendation","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwi2l%2Fkubectl-vpa-recommendation","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwi2l%2Fkubectl-vpa-recommendation/lists"}