Upgrade & Secure Your Future with DevOps, SRE, DevSecOps, MLOps!
We spend hours on Instagram and YouTube and waste money on coffee and fast food, but won’t spend 30 minutes a day learning skills to boost our careers.
Master in DevOps, SRE, DevSecOps & MLOps!
Learn from Guru Rajesh Kumar and double your salary in just one year.
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 characters
# Example 1: Get all values from an external secret
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: all-keys-example
spec:
refreshInterval: 1h
secretStoreRef:
kind: SecretStore
name: my-secret-store
dataFrom:
- key: my-secret
# This ExternalSecret will fetch all of the key-value pairs from the my-secret secret in the my-secret-store SecretStore and create a Kubernetes Secret with the same data.
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 characters
# Example 2: Get specific values from an external secret
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: specific-keys-example
spec:
refreshInterval: 1h
secretStoreRef:
kind: SecretStore
name: my-secret-store
dataFrom:
- key: my-secret
keys:
- username
- password
# This ExternalSecret will fetch the username and password keys from the my-secret secret in the my-secret-store SecretStore and create a Kubernetes Secret with the same data.
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 characters
# Example 3: Get values from an external secret and rewrite the keys
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: rewrite-keys-example
spec:
refreshInterval: 1h
secretStoreRef:
kind: SecretStore
name: my-secret-store
dataFrom:
- key: my-secret
rewrite:
- regexp:
source: "path/to/my/secrets/(.*)"
target: "$1"
# This ExternalSecret will fetch all of the key-value pairs from the my-secret secret in the my-secret-store SecretStore and create a Kubernetes Secret with the same data, but the keys will be rewritten by removing the path/to/my/secrets/ prefix.
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 characters
# Example 4: Get values from multiple external secrets
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: multiple-secrets-example
spec:
refreshInterval: 1h
dataFrom:
- key: my-secret-1
secretStoreRef:
kind: SecretStore
name: my-secret-store-1
- key: my-secret-2
secretStoreRef:
kind: SecretStore
name: my-secret-store-2
# This ExternalSecret will fetch the my-secret-1 secret from the my-secret-store-1 SecretStore and the my-secret-2 secret from the my-secret-store-2 SecretStore and create a Kubernetes Secret with the combined data.
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 characters
# Example 5: Get values from an external secret and specify the target Secret type
apiVersion: external-secrets.io/v1beta1
kind: ExternalSecret
metadata:
name: target-secret-type-example
spec:
refreshInterval: 1h
secretStoreRef:
kind: SecretStore
name: my-secret-store
dataFrom:
- key: my-secret
target:
type: Opaque
# This ExternalSecret will fetch the my-secret secret from the my-secret-store SecretStore and create a Kubernetes Secret with the same data, but the Secret type will be Opaque instead of the default Opaque.
I’m a DevOps/SRE/DevSecOps/Cloud Expert passionate about sharing knowledge and experiences. I am working at Cotocus. I blog tech insights at DevOps School, travel stories at Holiday Landmark, stock market tips at Stocks Mantra, health and fitness guidance at My Medic Plus, product reviews at I reviewed , and SEO strategies at Wizbrand.
DevOpsSchool has introduced a series of professional certification courses designed to enhance your skills and expertise in cutting-edge technologies and methodologies. Whether you are aiming to excel in development, security, or operations, these certifications provide a comprehensive learning experience. Explore the following programs:
DevOps Certification - Learn the fundamentals and advanced concepts of DevOps practices and tools.
SRE Certification - Gain expertise in Site Reliability Engineering and ensure reliability at scale.
MLOps Certification - Dive into Machine Learning Operations and streamline ML workflows.
AiOps Certification - Discover AI-driven operations management for next-gen IT environments.
Explore our DevOps Certification, SRE Certification, and DevSecOps Certification programs at DevOpsSchool. Gain the expertise needed to excel in your career with hands-on training and globally recognized certifications.