When using a container in Kubernetes, I prefer to use a shell command to complete the task instead of writing a python script since the shell commands are usually much simpler and intuitive.

If I want to encrypt a string “helloworld”, it could be accomplished by:

Shell

The ‘mypassword’ is the real password for encryption.

To decrypt, I could just use

Shell