In this section - I found the provided commands didn't generate the desired results.
The proposed commands seem to work for me.
Validated with:
kubectl version
Client Version: v1.28.6
Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3
Server Version: v1.28.6
openssl version
OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022)
base64 (GNU coreutils) 8.32