Compose config from several reusable blocks.
Section: Anchors and aliases
Merge multiple anchors
yaml
yaml
common: &common
logging: json
security: &security
readOnlyRootFilesystem: true
service:
<<: [*common, *security]
port: 8080Explanation
Useful for DRY configuration where shared defaults come from multiple sources.
Learn the surrounding workflow
Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.
Related commands
Same sheet · prioritizing Anchors and aliases
Merge shared mappings
Combine a base config with environment-specific overrides.
Catch duplicate mapping keys
Lint for repeated keys that override silently in some parsers.