kelseyhightower / kubernetes-the-hard-way

Bootstrap Kubernetes the hard way. No scripts.
Apache License 2.0
41.26k stars 14.12k forks source link

More recent versions of cfssl (~1.6.4) command syntax change #757

Open krc opened 10 months ago

krc commented 10 months ago

For the admin cert generation there is this cli command:

cfssl gencert \
  -ca=ca.pem \
  -ca-key=ca-key.pem \
  -config=ca-config.json \
  -profile=kubernetes \
  admin-csr.json | cfssljson -bare admin

This no longer works with at least 1.6.4 (current version as of January 2024), it errors: "only one argument is accepted, please check with usage".

The fix is to replace the = with spaces

cfssl gencert \
  -ca ca.pem \
  -ca-key ca-key.pem \
  -config ca-config.json \
  -profile kubernetes \
  admin-csr.json | cfssljson -bare admin