KUBERNETES(1)(kubernetes)

πŸ“¦
version 1.37.2 Β· 3 versions
, in arch rolling, fedora 43, fedora 44, nixos 26.05, nixpkgs unstable

πŸ’– KUBERNETES(1)(kubernetes) β€” kubeadm certs generate-csr πŸ’–

okay bestie, welcome to the kubernetes corner of the manual pages, section 1 πŸŽ€ this one's been around since Jan 2015, originally written by Eric Paris, and it's still giving ✨


🌸 NAME 🌸

kubeadm certs generate-csr β€” Generate keys and certificate signing requests


πŸ¦‹ SYNOPSIS πŸ¦‹

kubeadm certs generate-csr [OPTIONS]

✨ DESCRIPTION ✨

So basically? This command generates keys and certificate signing requests (CSRs) for all the certificates you need to run the control plane. All of them. The whole roster. πŸ‘‘

Not only that β€” it also generates partial kubeconfig files with private key data sitting right there in the "users > user > client-key-data" field. And for each kubeconfig file, it creates an accompanying .csr file too. Two for one, iconic. 🫢

This command is designed for use in Kubeadm External CA Mode ⟨https://kubernetes.io/docs/tasks/administer-cluster/kubeadm/kubeadm-certs/#external-ca-mode⟩. It generates CSRs which you can then submit to your external certificate authority for signing. Think of it like writing the letter, and someone else gets to sign it πŸ’…

Then the PEM encoded signed certificates should be saved alongside the key files, using .crt as the file extension. And in the case of kubeconfig files? The PEM encoded signed certificate should be base64 encoded and added to the kubeconfig file in the "users > user > client-certificate-data" field. That's the whole flow, fr fr.


πŸŽ€ OPTIONS πŸŽ€

  • --cert-dir="" β€” The path where to save the certificates
  • --config="" β€” Path to a kubeadm configuration file.
  • --kubeconfig-dir="/etc/kubernetes" β€” The path where to save the kubeconfig file.

πŸ’… OPTIONS INHERITED FROM PARENT COMMANDS πŸ’…

  • --rootfs="" β€” The path to the 'real' host root filesystem. This will cause kubeadm to chroot into the provided path.
  • --version=false β€” --version, --version=raw prints version information and quits; --version=vX.Y.Z... sets the reported version

🌈 EXAMPLE 🌈

not me giving you the exact copy-paste, you're welcome πŸ“
# The following command will generate keys and CSRs for all control-plane certificates and kubeconfig files:
kubeadm certs generate-csr --kubeconfig-dir /tmp/etc-k8s --cert-dir /tmp/etc-k8s/pki

πŸ”₯ SEE ALSO πŸ”₯


πŸ‘‘ HISTORY πŸ‘‘

January 2015, Originally compiled by Eric Paris (eparis at redhat dot com) based on the kubernetes source material, but hopefully they have been automatically generated since!


and that's a wrap bestie πŸ’– this page is from the Manuals shelf, User section, KUBERNETES(1)(kubernetes) β€” go forth and generate those CSRs, you absolute main character 🧚⭐

πŸ“¦ where this page comes from