-
-
Save Sancer/5e9bdb71fd0a202d403f2458b3a6fdf5 to your computer and use it in GitHub Desktop.
Revisions
-
troyharvey revised this gist
Dec 16, 2017 . 1 changed file with 2 additions and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -1,5 +1,6 @@ # Use secrets for things which are actually secret like API keys, credentials, etc # Base64 encode the values stored in a Kubernetes Secret: $ pbpaste | base64 | pbcopy # The --decode flag is convenient: $ pbpaste | base64 --decode apiVersion: v1 kind: Secret -
troyharvey revised this gist
Nov 29, 2017 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -26,4 +26,4 @@ spec: - configMapRef: name: env-configmap - secretRef: name: env-secrets -
troyharvey created this gist
Nov 4, 2017 .There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,29 @@ # Use envFrom to load Secrets and ConfigMaps into environment variables apiVersion: apps/v1beta2 kind: Deployment metadata: name: mans-not-hot labels: app: mans-not-hot spec: replicas: 1 selector: matchLabels: app: mans-not-hot template: metadata: labels: app: mans-not-hot spec: containers: - name: app image: gcr.io/mans-not-hot/app:bed1f9d4 imagePullPolicy: Always ports: - containerPort: 80 envFrom: - configMapRef: name: env-configmap - secretRef: name: env-secret This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,9 @@ # Use config map for not-secret configuration data apiVersion: v1 kind: ConfigMap metadata: name: env-configmap data: APP_NAME: Mans Not Hot APP_ENV: production This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,11 @@ # Use secrets for things which are actually secret like API keys, credentials, etc # pbpaste | base64 | pbcopy apiVersion: v1 kind: Secret metadata: name: env-secrets type: Opaque data: DB_PASSWORD: cDZbUGVXeU5e0ZW REDIS_PASSWORD: AAZbUGVXeU5e0ZB