Skip to content

Commit

Permalink
feat: ✨ Configs: Secrets
Browse files Browse the repository at this point in the history
Kubernetes Secrets are secure objects used to store sensitive data, such as passwords, API keys, or tokens, within a cluster. They help protect confidential information and reduce the risk of exposing it accidentally. Secrets store data in base64 encoding, ensuring an additional layer of obfuscation. They can be mounted as files, used as environment variables, or accessed by the Kubernetes API, providing a secure and controlled way to share sensitive information with containers.
  • Loading branch information
kevencript committed Mar 18, 2023
1 parent 7eb28ea commit 817fec6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 3 additions & 1 deletion k8s/deployment.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,12 @@ spec:
spec:
containers:
- name: go-http-app
image: wesleywillians/hello-go:v5 # This image have the fields "NAME" & "AGE" & a file injection on myfamily/family.txt
image: wesleywillians/hello-go:v5.2 # This image have the fields "NAME" & "AGE" & a file injection on myfamily/family.txt
envFrom:
- configMapRef:
name: go-http-app-env
- secretRef:
name: secret-app
volumeMounts:
- mountPath: "/go/myfamily"
name: file-injection
Expand Down
8 changes: 8 additions & 0 deletions k8s/secret.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
apiVersion: v1
kind: Secret
metadata:
name: secret-app
type: Opaque
data:
USER: Z2FicmllbAo=
PASSWORD: MTIzNDU2Nwo=

0 comments on commit 817fec6

Please sign in to comment.