jhunt / k8s-boshrelease

A BOSH Release for deploying Kubernetes clusters
MIT License
13 stars 9 forks source link

Add Metric-server #38

Open obeyler opened 4 years ago

obeyler commented 4 years ago

To be able to use Horizontal pos autoscaling (https://kubernetes.io/docs/tasks/run-application/horizontal-pod-autoscale/), metric-server need to be installed inside the cluster. May we can add it inside the control plane like cert-manager.

jhunt commented 4 years ago

Since this is just a YAML apply, it can definitely go in the same way cert-manager does.

See https://github.com/kubernetes-sigs/metrics-server#deployment for installation steps.

obeyler commented 4 years ago

It's not really same as cert manager as it also needs to add args on kube-api server to enable aggregation layer

    jobs:
    - name: control
      properties:
        apiserver:
          flags:
          - enable-aggregator-routing: true
          - requestheader-client-ca-file: /var/vcap/jobs/control/tls/ca/cert.pem
          - requestheader-allowed-names: ""
          - requestheader-extra-headers-prefix: X-Remote-Extra-
          - requestheader-group-headers: X-Remote-Group
          - requestheader-username-headers: X-Remote-User
          - proxy-client-cert-file: /var/vcap/data/k8s/certs/api/cert.pem
          - proxy-client-key-file: /var/vcap/data/k8s/certs/api/key.pem
obeyler commented 4 years ago

May we can add this flag by default on api server (I think it's the best choice) or add it only if we enable metrics-server What do you prefer ? I'll update my PR depending your answer.

jhunt commented 4 years ago

I would prefer the latter; if metrics-server is enabled, then we adjust the default set of apiserver flags.