Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable kubectl top functionality #2049

Closed
thomasdanan opened this issue Nov 14, 2019 · 0 comments
Closed

Enable kubectl top functionality #2049

thomasdanan opened this issue Nov 14, 2019 · 0 comments
Assignees
Labels
topic:deployment Bugs in or enhancements to deployment stages

Comments

@thomasdanan
Copy link
Contributor

thomasdanan commented Nov 14, 2019

Component:

'kubernetes'

Why this is needed:

Some use may rely on that command to quickly check CPU / RAM metrics associated with node, pod or container.

What should be done:

Have kubectl top available natively from each node of the cluster

in the meantime a workaround would be to deploy it manually, post-installation using the following command: helm install stable/metrics-server

Implementation proposal (strongly recommended):

Prefer prometheus-adapter (instead of metric-server) to expose those metrics so that in the future we can leverage more specific pod metrics to get more info to drive pod autoscaling for example ...

Test plan*:

@thomasdanan thomasdanan added topic:deployment Bugs in or enhancements to deployment stages moonshot labels Nov 14, 2019
@thomasdanan thomasdanan added this to the MetalK8s 2.4.2 milestone Nov 14, 2019
@NicolasT NicolasT self-assigned this Nov 19, 2019
NicolasT added a commit that referenced this issue Nov 19, 2019
This should enable the `metrics.k8s.io` API, and as such reinstate the
`kubectl top` functionality and allow the `HorizontalPodAutoscaler`
controller to work.

The chart is rendered using

```
$ ./charts/render.py prometheus-adapter metalk8s-monitoring charts/prometheus-adapter.yaml charts/prometheus-adapter/ > salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls
```

Fixes: #2049
See: #2049
NicolasT added a commit that referenced this issue Nov 26, 2019
This should enable the `metrics.k8s.io` API, and as such reinstate the
`kubectl top` functionality and allow the `HorizontalPodAutoscaler`
controller to work.

The chart is rendered using

```
$ ./charts/render.py prometheus-adapter metalk8s-monitoring charts/prometheus-adapter.yaml charts/prometheus-adapter/ > salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls
```

Fixes: #2049
See: #2049
NicolasT added a commit that referenced this issue Nov 26, 2019
We assume that if this API is available and returns 'expected' results,
the `kubectl top` command works (since it uses this API under the hood).

See: 241c355
See: #2049
See: #2057
NicolasT added a commit that referenced this issue Nov 26, 2019
… into w/2.5/improvement/GH-2049-metrics-api

* origin/improvement/GH-2049-metrics-api:
  tests: test `metrics.k8s.io/v1beta1`
  tests: re-instate `metrics.k8s.io` `APIService` test
  monitoring: deploy `prometheus-adapter`
  charts: import `stable/prometheus-adapter` 1.4.0

Conflicts:
	buildchain/buildchain/constants.py
	buildchain/buildchain/salt_tree.py
	salt/metalk8s/deployed.sls
NicolasT added a commit that referenced this issue Nov 27, 2019
This should enable the `metrics.k8s.io` API, and as such reinstate the
`kubectl top` functionality and allow the `HorizontalPodAutoscaler`
controller to work.

The chart is rendered using

```
$ ./charts/render.py prometheus-adapter metalk8s-monitoring charts/prometheus-adapter.yaml charts/prometheus-adapter/ > salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls
```

Fixes: #2049
See: #2049
NicolasT added a commit that referenced this issue Nov 27, 2019
We assume that if this API is available and returns 'expected' results,
the `kubectl top` command works (since it uses this API under the hood).

See: 241c355
See: #2049
See: #2057
NicolasT added a commit that referenced this issue Nov 27, 2019
… into w/2.5/improvement/GH-2049-metrics-api

* origin/improvement/GH-2049-metrics-api:
  tests: test `metrics.k8s.io/v1beta1`
  tests: re-instate `metrics.k8s.io` `APIService` test
  monitoring: deploy `prometheus-adapter`
  charts: import `stable/prometheus-adapter` 1.4.0

Conflicts:
	buildchain/buildchain/constants.py
	buildchain/buildchain/salt_tree.py
	salt/metalk8s/deployed.sls
NicolasT added a commit that referenced this issue Dec 2, 2019
This should enable the `metrics.k8s.io` API, and as such reinstate the
`kubectl top` functionality and allow the `HorizontalPodAutoscaler`
controller to work.

The chart is rendered using

```
$ ./charts/render.py prometheus-adapter metalk8s-monitoring charts/prometheus-adapter.yaml charts/prometheus-adapter/ > salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls
```

Fixes: #2049
See: #2049
NicolasT added a commit that referenced this issue Dec 2, 2019
We assume that if this API is available and returns 'expected' results,
the `kubectl top` command works (since it uses this API under the hood).

See: 241c355
See: #2049
See: #2057
NicolasT added a commit that referenced this issue Dec 2, 2019
… into w/2.5/improvement/GH-2049-metrics-api

* origin/improvement/GH-2049-metrics-api:
  tests: test `metrics.k8s.io/v1beta1`
  tests: re-instate `metrics.k8s.io` `APIService` test
  monitoring: deploy `prometheus-adapter`
  charts: import `stable/prometheus-adapter` 1.4.0

Conflicts:
	buildchain/buildchain/constants.py
	buildchain/buildchain/salt_tree.py
	salt/metalk8s/deployed.sls
NicolasT added a commit that referenced this issue Dec 3, 2019
This should enable the `metrics.k8s.io` API, and as such reinstate the
`kubectl top` functionality and allow the `HorizontalPodAutoscaler`
controller to work.

The chart is rendered using

```
$ ./charts/render.py prometheus-adapter metalk8s-monitoring charts/prometheus-adapter.yaml charts/prometheus-adapter/ > salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls
```

Fixes: #2049
See: #2049
NicolasT added a commit that referenced this issue Dec 3, 2019
We assume that if this API is available and returns 'expected' results,
the `kubectl top` command works (since it uses this API under the hood).

See: 241c355
See: #2049
See: #2057
NicolasT added a commit that referenced this issue Dec 3, 2019
… into w/2.5/improvement/GH-2049-metrics-api

* origin/improvement/GH-2049-metrics-api:
  tests: test `metrics.k8s.io/v1beta1`
  tests: re-instate `metrics.k8s.io` `APIService` test
  monitoring: deploy `prometheus-adapter`
  charts: import `stable/prometheus-adapter` 1.4.0

Conflicts:
	buildchain/buildchain/constants.py
	buildchain/buildchain/salt_tree.py
	salt/metalk8s/deployed.sls
NicolasT added a commit that referenced this issue Dec 5, 2019
This should enable the `metrics.k8s.io` API, and as such reinstate the
`kubectl top` functionality and allow the `HorizontalPodAutoscaler`
controller to work.

The chart is rendered using

```
$ ./charts/render.py prometheus-adapter metalk8s-monitoring charts/prometheus-adapter.yaml charts/prometheus-adapter/ > salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls
```

Fixes: #2049
See: #2049
NicolasT added a commit that referenced this issue Dec 5, 2019
We assume that if this API is available and returns 'expected' results,
the `kubectl top` command works (since it uses this API under the hood).

See: 241c355
See: #2049
See: #2057
NicolasT added a commit that referenced this issue Dec 5, 2019
… into w/2.5/improvement/GH-2049-metrics-api

* origin/improvement/GH-2049-metrics-api:
  tests: test `metrics.k8s.io/v1beta1`
  tests: re-instate `metrics.k8s.io` `APIService` test
  monitoring: deploy `prometheus-adapter`
  charts: import `stable/prometheus-adapter` 1.4.0

Conflicts:
	buildchain/buildchain/constants.py
	buildchain/buildchain/salt_tree.py
	salt/metalk8s/deployed.sls
NicolasT added a commit that referenced this issue Dec 12, 2019
This should enable the `metrics.k8s.io` API, and as such reinstate the
`kubectl top` functionality and allow the `HorizontalPodAutoscaler`
controller to work.

The chart is rendered using

```
$ ./charts/render.py prometheus-adapter metalk8s-monitoring charts/prometheus-adapter.yaml charts/prometheus-adapter/ > salt/metalk8s/addons/prometheus-adapter/deployed/chart.sls
```

Fixes: #2049
See: #2049
NicolasT added a commit that referenced this issue Dec 12, 2019
We assume that if this API is available and returns 'expected' results,
the `kubectl top` command works (since it uses this API under the hood).

See: 241c355
See: #2049
See: #2057
NicolasT added a commit that referenced this issue Dec 12, 2019
… into w/2.5/improvement/GH-2049-metrics-api

* origin/improvement/GH-2049-metrics-api:
  tests: test `metrics.k8s.io/v1beta1`
  tests: re-instate `metrics.k8s.io` `APIService` test
  monitoring: deploy `prometheus-adapter`
  charts: import `stable/prometheus-adapter` 1.4.0

Conflicts:
	buildchain/buildchain/constants.py
	buildchain/buildchain/salt_tree.py
	salt/metalk8s/deployed.sls
NicolasT added a commit that referenced this issue Dec 12, 2019
We assume that if this API is available and returns 'expected' results,
the `kubectl top` command works (since it uses this API under the hood).

See: 241c355
See: #2049
See: #2057
NicolasT added a commit that referenced this issue Dec 12, 2019
… into w/2.5/improvement/GH-2049-metrics-api

* origin/improvement/GH-2049-metrics-api:
  tests: test `metrics.k8s.io/v1beta1`
  tests: re-instate `metrics.k8s.io` `APIService` test
  monitoring: deploy `prometheus-adapter`
  ci: make multi-node bootstrap 'm1.large'
  charts: import `stable/prometheus-adapter` 1.4.0

Conflicts:
	buildchain/buildchain/constants.py
	buildchain/buildchain/salt_tree.py
	salt/metalk8s/deployed.sls
NicolasT added a commit that referenced this issue Dec 17, 2019
…GH-2049-metrics-api

* origin/development/2.4:
  ci: don't re-run bootstrap in multi-node tests
  salt: Add a version label on each Kubernetes objects
  salt: `def __virtualname__` ain't right
  salt, kubernetes: remove `apiServer` from `BootstrapConfiguration`
  scripts/iso-manager: override `metalk8s.api_server.kubeconfig` in Pillar
  salt, kubernetes: use the `apiserver-proxy` to connect to `kube-apiserver`
  kubernetes: use control-plane IP in generated `KubeConfig`
  salt: deploy a local proxy to `kube-apiserver` on all nodes
  kubernetes: add `127.0.0.1` to SAN of `kube-apiserver` cert
  buildchain/image: allow to save image in multiple formats at once
  buildchain: distribute `nginx` as tar *and* in registry
  salt: use consistent permissions on SA private key
  salt: remove `metalk8s.internal.init`
  images: don't use `etcd3` 0.11.0 in `salt-master`
  ci: explicitly source `/etc/profile` when running build
  docs: Add extra warning about Grafana customization
  docs: Improve upgrade/downgrade documentation
  salt: persist k8s passwd file
  salt: Store more etcd members informations in pillar

Conflicts:
	CHANGELOG.md
NicolasT added a commit that referenced this issue Dec 17, 2019
…ovement/GH-2049-metrics-api

* origin/development/2.5: (27 commits)
  ci: don't re-run bootstrap in multi-node tests
  buildchain/targets: support list of objects for YAML serializer
  buildchain/salt: use Renderer
  buildchain/targets: add a SLS Renderer
  buildchain/targets: add `type: ignore` annotations
  buildchain/targets: add a YAML Renderer
  buildchain/deps: add PyYAML
  salt: Add a version label on each Kubernetes objects
  calico: update to Calico 3.10.2
  salt: `def __virtualname__` ain't right
  salt, kubernetes: remove `apiServer` from `BootstrapConfiguration`
  scripts/iso-manager: override `metalk8s.api_server.kubeconfig` in Pillar
  salt, kubernetes: use the `apiserver-proxy` to connect to `kube-apiserver`
  kubernetes: use control-plane IP in generated `KubeConfig`
  salt: deploy a local proxy to `kube-apiserver` on all nodes
  kubernetes: add `127.0.0.1` to SAN of `kube-apiserver` cert
  buildchain/image: allow to save image in multiple formats at once
  buildchain: distribute `nginx` as tar *and* in registry
  salt: use consistent permissions on SA private key
  salt: remove `metalk8s.internal.init`
  ...

Conflicts:
	CHANGELOG.md
NicolasT added a commit that referenced this issue Dec 17, 2019
… into w/2.5/improvement/GH-2049-metrics-api

* origin/improvement/GH-2049-metrics-api:
@thomasdanan thomasdanan reopened this Dec 17, 2019
bert-e added a commit that referenced this issue Dec 17, 2019
…4/improvement/GH-2049-metrics-api' into tmp/octopus/q/2.5
@bert-e bert-e closed this as completed in 68e70cd Dec 17, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic:deployment Bugs in or enhancements to deployment stages
Projects
None yet
Development

No branches or pull requests

3 participants