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

mTLS secret generation docs incorrect #10736

Open
shmargum opened this issue Jan 6, 2022 · 1 comment
Open

mTLS secret generation docs incorrect #10736

shmargum opened this issue Jan 6, 2022 · 1 comment

Comments

@shmargum
Copy link

shmargum commented Jan 6, 2022

TLS secret generation docs appear to be incorrect, link:
https://istio.io/latest/docs/tasks/traffic-management/ingress/secure-ingress/#configure-a-mutual-tls-ingress-gateway

the listed key formats seem to work and are correct:

  • A TLS Secret with keys tls.key and tls.crt, as described above. For mutual TLS, a ca.crt key can be used.
  • A generic Secret with keys key and cert. For mutual TLS, a cacert key can be used.

the examples given are incorrect:

  • kubectl create -n istio-system secret tls httpbin-credential --key=httpbin.example.com.key --cert=httpbin.example.com.crt
  • kubectl create -n istio-system secret generic httpbin-credential --from-file=tls.key=httpbin.example.com.key --from-file=tls.crt=httpbin.example.com.crt --from-file=ca.crt=example.com.crt

the correct command for a generic secret would be:

  • kubectl create -n istio-system secret generic httpbin-credential --from-file=key=httpbin.example.com.key --from-file=cert=httpbin.example.com.crt --from-file=cacert=example.com.crt

i have not tested tls type secrets, but docs definitely provide conflicting info

@howardjohn
Copy link
Member

Agree the doc is wrong - the type of the secret doesn't matter, only the keys

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants