I use OpenSSL & generated self signed certificate & key files.
Now I try to transform them to base64 encoded value in order to put into kubernetes "Secret" manifest. I tried the answer from this post.
But the accepted answer doesn't work for me, this is what I get:
cat myapp.com.crt | base64 -w0
base64: invalid argument -w0
Usage: base64 [-hDd] [-b num] [-i in_file] [-o out_file]
-h, --help display this message
-Dd, --decode decodes input
-b, --break break encoded string into num character lines
-i, --input input file (default: "-" for stdin)
-o, --output output file (default: "-" for stdout)
Why is that? How to get the base64 encoded value for my certificate so that I can use the value in k8s secret manifest?