mirror of
https://github.com/marcel-dempers/docker-development-youtube-series.git
synced 2025-06-06 17:01:30 +00:00
updates to deploy and secret yaml
This commit is contained in:
parent
1dd2779121
commit
e66d185444
@ -6,7 +6,15 @@ metadata:
|
|||||||
app: example-app
|
app: example-app
|
||||||
annotations:
|
annotations:
|
||||||
spec:
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
app: example-app
|
||||||
replicas: 2
|
replicas: 2
|
||||||
|
strategy:
|
||||||
|
type: RollingUpdate
|
||||||
|
rollingUpdate:
|
||||||
|
maxSurge: 1
|
||||||
|
maxUnavailable: 0
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
@ -31,10 +39,15 @@ spec:
|
|||||||
limits:
|
limits:
|
||||||
memory: "256Mi"
|
memory: "256Mi"
|
||||||
cpu: "500m"
|
cpu: "500m"
|
||||||
volumeMouts:
|
volumeMounts:
|
||||||
- name: config-volume
|
- name: secret-volume
|
||||||
mountPath: /configs/
|
mountPath: /secrets/
|
||||||
volumes:
|
- name: config-volume
|
||||||
- name: config-volume
|
mountPath: /configs/
|
||||||
configMap:
|
volumes:
|
||||||
name: example-config #name of our configmap object
|
- name: secret-volume
|
||||||
|
secret:
|
||||||
|
secretName: mysecret
|
||||||
|
- name: config-volume
|
||||||
|
configMap:
|
||||||
|
name: example-config #name of our configmap object
|
12
kubernetes/secrets/secret.yaml
Normal file
12
kubernetes/secrets/secret.yaml
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
apiVersion: v1
|
||||||
|
kind: Secret
|
||||||
|
metadata:
|
||||||
|
name: mysecret
|
||||||
|
type: Opaque
|
||||||
|
stringData:
|
||||||
|
secret.json: |-
|
||||||
|
{
|
||||||
|
"api_key" : "somesecretgoeshere"
|
||||||
|
}
|
||||||
|
|
||||||
|
#kubectl create secret generic mysecret --from-file .\golang\secrets\secret.json
|
Loading…
x
Reference in New Issue
Block a user