kubernetes / autoscaler

Autoscaling components for Kubernetes
Apache License 2.0
8.11k stars 3.98k forks source link

Rancher: Custom CA for cloud config #5438

Closed bennysp closed 1 year ago

bennysp commented 1 year ago

Which component are you using?: cluster-autoscaler

What version of the component are you using?:

Component version: 1.26.1

What k8s version are you using (kubectl version)?:

kubectl version Output
$ kubectl version
Client Version: version.Info{Major:"1", Minor:"21", GitVersion:"v1.21.8", GitCommit:"4a3b558c52eb6995b3c5c1db5e54111bd0645a64", GitTreeState:"clean", BuildDate:"2021-12-15T14:52:11Z", GoVersion:"go1.16.12", Compiler:"gc", Platform:"linux/amd64"}
Server Version: version.Info{Major:"1", Minor:"24", GitVersion:"v1.24.2+rke2r1", GitCommit:"f66044f4361b9f1f96f0053dd46cb7dce5e990a8", GitTreeState:"clean", BuildDate:"2022-06-17T16:04:41Z", GoVersion:"go1.18.3b7", Compiler:"gc", Platform:"linux/amd64"}

What environment is this in?:

What did you expect to happen?:

N/A

What happened instead?:

F0121 21:22:16.799439 1 rancher_provider.go:69] failed to create rancher cloud provider: failed to get ServerGroups: Get "https://rancher.domain.com/api?timeout=32s": x509: certificate signed by unknown authority

How to reproduce it (as minimally and precisely as possible):

Deploy rancher with custom CA for the Management cluster.

Anything else we need to know?:

My Rancher cluster is using a custom CA. I believe the cloud config may need an option to specify the CA (like in a kubeconfig file).

atsai1220 commented 1 year ago

You can mount the CA via the Helm values

extraVolumes:
- name: ssl-certs
  configMap:
    name: your-ca
extraVolumeMounts:
- name: ssl-certs
  mountPath: /etc/ssl/certs
  readOnly: true

With your ConfigMap in the same namespace as the autoscaler.

apiVersion: v1
data:
  ca-certificates.crt: |
    -----BEGIN CERTIFICATE-----
...
...
    -----END CERTIFICATE-----
kind: ConfigMap
metadata:
  name: your-ca
k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle stale

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues.

This bot triages un-triaged issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/lifecycle rotten

k8s-triage-robot commented 1 year ago

The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs.

This bot triages issues according to the following rules:

You can:

Please send feedback to sig-contributor-experience at kubernetes/community.

/close not-planned

k8s-ci-robot commented 1 year ago

@k8s-triage-robot: Closing this issue, marking it as "Not Planned".

In response to [this](https://github.com/kubernetes/autoscaler/issues/5438#issuecomment-1636848411): >The Kubernetes project currently lacks enough active contributors to adequately respond to all issues and PRs. > >This bot triages issues according to the following rules: >- After 90d of inactivity, `lifecycle/stale` is applied >- After 30d of inactivity since `lifecycle/stale` was applied, `lifecycle/rotten` is applied >- After 30d of inactivity since `lifecycle/rotten` was applied, the issue is closed > >You can: >- Reopen this issue with `/reopen` >- Mark this issue as fresh with `/remove-lifecycle rotten` >- Offer to help out with [Issue Triage][1] > >Please send feedback to sig-contributor-experience at [kubernetes/community](https://github.com/kubernetes/community). > >/close not-planned > >[1]: https://www.kubernetes.dev/docs/guide/issue-triage/ Instructions for interacting with me using PR comments are available [here](https://git.k8s.io/community/contributors/guide/pull-requests.md). If you have questions or suggestions related to my behavior, please file an issue against the [kubernetes/test-infra](https://github.com/kubernetes/test-infra/issues/new?title=Prow%20issue:) repository.