Skip to content

Instantly share code, notes, and snippets.

@engineerball
Created December 19, 2015 09:24
Show Gist options
  • Select an option

  • Save engineerball/27014ce1b569b9ef63e6 to your computer and use it in GitHub Desktop.

Select an option

Save engineerball/27014ce1b569b9ef63e6 to your computer and use it in GitHub Desktop.
mkdir tmp
openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tmp/nginx.key -out tmp/nginx.crt -subj "/CN=nginxsvc/O=nginxsvc"
echo "apiVersion: v1
kind: Secret
metadata:
name: nginxsecret
type: Opaque
data:
nginx.crt: `base64 -w 0 tmp/nginx.crt`
nginx.key: `base64 -w 0 tmp/nginx.key`" > nginxsecret.yaml
rm -f tmp/nginx.crt tmp/nginx.key
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment