Actually according to the command in example:
kubectl create secret generic ssh-key-secret --from-file=ssh-privatekey=/path/to/.ssh/id_rsa --from-file=ssh-publickey=/path/to/.ssh/id_rsa.pub
The keys will be available with names ssh-publickey and ssh-privatekey.
The way that the document currently flows and how we typically perceive credentials, we usually set our username first followed by the password.
Seeing the configuration first set password then username seems counter-intuitive. There is nothing wrong with the docs, it is just clearer to view username=>password.
`-d` is used for the Linux version of the command but in the Mac/BSD version they use `-D`.
Using `--decode` we are sure that the flag is compatible with both.
1) The example given in the section "Using Secrets as Environment
Variables" incorrectly stated the secret was using a volume.
2) The commands used to produce secrets in the section "Use-Case: Pods
with prod / test credentials" has been modified such that the literal
used matches the text for what expected files should be on the
filesystem (changed user to username).
In the example in section "Use-Case: Pod with ssh keys", change name of new SSH secret from "my-secret" to "ssh-key-secret" to match that in the subsequent pod specification that references the secret.
the anchor `#use-case-two-containers` will jump the page where the title is not visible, so it's hard to understand the context. `#use-case-secret-visible-to-one-container-in-a-pod` is a better anchor choice since it jumps straight to the title so the context is clear.
One could be bitten by having unexpected newline characters in base64 encoded secrets (reference: https://github.com/kubernetes/kubernetes/issues/23404).
Calling `echo -n` will omit the trailing newline character.
`
The echo utility writes any specified operands, separated by single blank (` ') characters and followed by
a newline (`\n') character, to the standard output.
The following option is available:
-n Do not print the trailing newline character. This may also be achieved by appending `\c' to the end
of the string, as is done by iBCS2 compatible systems. Note that this option as well as the effect
of `\c' are implementation-defined in IEEE Std 1003.1-2001 (``POSIX.1'') as amended by Cor. 1-2002.
Applications aiming for maximum portability are strongly encouraged to use printf(1) to suppress the
newline character.
`