Hardcode keys in kubectl create secret commands

This hardcodes the generated key name in all `kubectl create secret` commands where the `--from-file` option is used. It ensures that the stored key is the one that Rancher expects and does not rely on the local file name.

Signed-off-by: Bastian Hofmann <bashofmann@gmail.com>
This commit is contained in:
Bastian Hofmann
2020-07-15 09:58:03 -07:00
committed by Catherine Luse
parent 1c7d7d62eb
commit d100d3a099
4 changed files with 4 additions and 8 deletions
@@ -139,7 +139,7 @@ If you have private registries, catalogs or a proxy that intercepts certificates
Once the Rancher deployment is created, copy your CA certs in pem format into a file named `ca-additional.pem` and use `kubectl` to create the `tls-ca-additional` secret in the `cattle-system` namespace.
```plain
kubectl -n cattle-system create secret generic tls-ca-additional --from-file=ca-additional.pem
kubectl -n cattle-system create secret generic tls-ca-additional --from-file=ca-additional.pem=./ca-additional.pem
```
### Private Registry and Air Gap Installs
@@ -135,7 +135,7 @@ If you have private registries, catalogs or a proxy that intercepts certificates
Once the Rancher deployment is created, copy your CA certs in pem format into a file named `ca-additional.pem` and use `kubectl` to create the `tls-ca-additional` secret in the `cattle-system` namespace.
```plain
kubectl -n cattle-system create secret generic tls-ca-additional --from-file=ca-additional.pem
kubectl -n cattle-system create secret generic tls-ca-additional --from-file=ca-additional.pem=./ca-additional.pem
```
### Private Registry and Air Gap Installs
@@ -27,9 +27,7 @@ If you are using a private CA, Rancher requires a copy of the CA certificate whi
Copy the CA certificate into a file named `cacerts.pem` and use `kubectl` to create the `tls-ca` secret in the `cattle-system` namespace.
>**Important:** Make sure the file is called `cacerts.pem` as Rancher uses that filename to configure the CA certificate.
```
kubectl -n cattle-system create secret generic tls-ca \
--from-file=cacerts.pem
--from-file=cacerts.pem=./cacerts.pem
```
@@ -28,11 +28,9 @@ If you are using a private CA, Rancher requires a copy of the CA certificate whi
Copy the CA certificate into a file named `cacerts.pem` and use `kubectl` to create the `tls-ca` secret in the `cattle-system` namespace.
>**Important:** Make sure the file is called `cacerts.pem` as Rancher uses that filename to configure the CA certificate.
```
kubectl -n cattle-system create secret generic tls-ca \
--from-file=cacerts.pem
--from-file=cacerts.pem=./cacerts.pem
```
> **Note:** The configured `tls-ca` secret is retrieved when Rancher starts. On a running Rancher installation the updated CA will take effect after new Rancher pods are started.