Understanding Design Patterns
Design patterns in Meshery (also called “Designs”) are declarative specifications of your infrastructure that include:- Components - Kubernetes resources and cloud native services
- Configuration - Properties and settings for each component
- Relationships - How components interact (hierarchical, network, binding)
- Metadata - Annotations, labels, and documentation
- Deployed to clusters
- Shared via the catalog
- Version controlled
- Validated against policies
Design Types
Meshery supports multiple design types:Design
Native Meshery designs with visual components and relationshipsExtensions:
.yaml, .ymlKubernetes Manifest
Standard K8s YAML manifestsExtensions:
.yaml, .ymlHelm Chart
Packaged Helm chartsExtensions:
.tgzDocker Compose
Docker Compose files converted to K8sExtensions:
.yaml, .ymlCreating Design Patterns
Using the Visual Canvas
Open Design Canvas
- Navigate to Designs in Meshery UI
- Click Create Design
- Enter design name and description
- Open in canvas editor
Add Components
From the component library (left sidebar):
- Search for components from 300+ integrations
- Drag components onto canvas
- Position and organize visually
- Kubernetes: Deployment, Service, ConfigMap, Secret
- Service Meshes: VirtualService, DestinationRule, Gateway
- Storage: PersistentVolume, StorageClass
- Networking: Ingress, NetworkPolicy
Define Relationships
Meshery automatically infers relationships, but you can customize:Hierarchical: Namespace contains Deployments, PodsNetwork: Service exposes DeploymentBinding: Role binds to ServiceAccount
Importing Existing Configurations
Convert existing infrastructure to designs:- Kubernetes Manifest
- Helm Chart
- Docker Compose
- URL Import
Working with Design Files
Design File Structure
A Meshery design file follows this structure:Exporting Designs
Export from UI
- Open design in Meshery UI
- Click Actions → Export
- Choose format (YAML, JSON)
- Download file
Deploying Design Patterns
Prepare Target Environment
Ensure you have:
- Active Kubernetes connection
- Proper RBAC permissions
- Required namespaces created
Deploy via UI
- Navigate to Designs
- Select design
- Click Deploy
- Choose environment and workspace
- Confirm deployment
Pattern Catalog
The Meshery Catalog contains curated design patterns for common scenarios:Browsing the Catalog
Access Catalog
Visit https://meshery.io/catalog or access through Meshery UI.
Search Patterns
Filter by:
- Technology (Istio, Linkerd, NGINX, etc.)
- Use case (monitoring, security, networking)
- Complexity (beginner, intermediate, advanced)
Publishing to Catalog
Share your designs with the community:Prepare Design
Ensure your design:
- Has clear name and description
- Includes documentation
- Follows best practices
- Is validated and tested
Submit for Review
- Export design as YAML
- Open pull request to meshery/meshery
- Add to
docs/catalog/directory - Include
artifacthub-pkg.ymlmetadata
Design Validation
Meshery validates designs against policies and best practices:Schema Validation
Designs are validated against component schemas:- Missing required fields
- Invalid property types
- Unknown component types
- Relationship conflicts
Policy Validation
OPA policies can enforce design constraints. See Policy Engine for details.Parameterizing Designs
Create reusable designs with parameters:Design Versioning
Best Practices
Organization
- Namespace Grouping: Group related components in namespaces
- Naming Conventions: Use consistent, descriptive names
- Labels: Add meaningful labels for filtering and selection
- Documentation: Include descriptions and annotations
Reusability
- Modular Designs: Create small, composable patterns
- Parameters: Use variables for environment-specific values
- Relationships: Leverage automatic relationship inference
Security
- Secrets Management: Never hardcode secrets
- RBAC: Define minimal required permissions
- Network Policies: Include network segmentation
- Policy Validation: Validate against security policies
Troubleshooting
Import Failures
Deployment Errors
- Check component validation messages
- Verify target cluster connectivity
- Ensure namespace exists
- Review RBAC permissions
- Check resource quotas
Relationship Issues
If automatic relationships aren’t detected:- Ensure labels match selectors
- Verify namespace consistency
- Manually define relationship in design file
Next Steps
- Deploy patterns across Multiple Clusters
- Enforce governance with OPA Policies
- Share patterns with your team using Workspaces
- Explore the Pattern Catalog