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

metrics-server: try replacing helm with kustomize #9

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

waynr
Copy link
Collaborator

@waynr waynr commented Jul 15, 2019

This PR proposes the use of the kustomize included in kubectl instead of the third-party helm to deploy metrics-server.

The way this works is roughly:

  1. create a DOKS cluster (just like before)
  2. clone kubernetes-incubator/metrics-server at a specific git ref
  3. call kubectl kustomize in the metrics-server directory
  • this makes use of the kustomization.yaml file in the metrics-server directory
  • the kustomization.yaml file points at example deployment manifests in the cloned kubernetes-incubator/metrics-server directory
  • the kustomization.yaml patches the upstream example deployment manifests with settings similar to what came with the helm chart
  1. just like before, wait until the metrics-server pod(s) are ready

One major difference from the helm chart is that with helm it was easy to deploy metrics-server to its own namespace whereas the upstream example manifests on which the kustomize approach is based assume deployment in kube-system. It wasn't straightforward to use kustomize patches or bases to do something similar -- I'm sure it's possible, I just haven't found the minimal set of patches necessary yet.

Copy link
Owner

@snormore snormore left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great 👍

@snormore
Copy link
Owner

I just merged a PR that switches to CircleCI so you shouldn't hit the invalid-token issue anymore with this after rebasing onto master.

This PR proposes the use of the kustomize included in `kubectl` instead of the third-party `helm` to deploy metrics-server.

The way this works is roughly:

1. create a DOKS cluster (just like before)
1. clone `kubernetes-incubator/metrics-server` at a specific git ref
1. call `kubectl kustomize` in the `metrics-server` directory
  * this makes use of the `kustomization.yaml` file in the `metrics-server` directory
  * the `kustomization.yaml` file points at example deployment manifests in the cloned `kubernetes-incubator/metrics-server` directory
  * the `kustomization.yaml` patches the upstream example deployment manifests with settings similar to what came with the `helm` chart
1. just like before, wait until the `metrics-server` pod(s) are ready

One major difference from the `helm` chart is that with `helm` it was easy to deploy `metrics-server` to its own namespace whereas the upstream example manifests on which the `kustomize` approach is based assume deployment in `kube-system`. It wasn't straightforward to use `kustomize` patches or bases to do something similar -- I'm sure it's possible, I just haven't found the minimal set of patches necessary yet.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants