Skip to main content
The component command manages individual infrastructure components that are part of models in the Meshery registry.

Synopsis

mesheryctl component [subcommand] [flags]

Subcommands

  • list - List all available components
  • view - View component details
  • search - Search for components by name or model

Global Flags

--count
boolean
default:"false"
Display total count of components

list

List all available infrastructure components.

Usage

mesheryctl component list [flags]

Flags

--page
integer
default:"1"
Page number for pagination
--page-size
integer
default:"25"
Number of components per page
--count
boolean
default:"false"
Display only the count of components

Examples

# List all components
mesheryctl component list

# Get component count
mesheryctl component list --count

Sample Output

COMPONENT              MODEL                VERSION
Pod                    Kubernetes           v1.28.0
Service                Kubernetes           v1.28.0
Deployment             Kubernetes           v1.28.0
VirtualService         Istio                1.19.0
DestinationRule        Istio                1.19.0
Prometheus             Prometheus           v2.45.0

Total: 1250 components

view

Display detailed information about a component.

Usage

mesheryctl component view [component-name] [flags]

Flags

--output
string
default:"yaml"
Output format: yaml, json. Short form: -o
--model
string
Filter by model name

Examples

# View component in YAML
mesheryctl component view Pod

# View in JSON format
mesheryctl component view Service -o json

Sample Output

component:
  kind: Pod
  version: v1
model:
  name: Kubernetes
  version: v1.28.0
displayName: Pod
category: Orchestration
schema:
  properties:
    apiVersion:
      type: string
    kind:
      type: string
    metadata:
      type: object
    spec:
      type: object
metadata:
  isNamespaced: true
  published: true
Search for components by name, model, or other attributes.

Usage

mesheryctl component search [search-term] [flags]

Flags

--model
string
Filter by model name
--category
string
Filter by category
--version
string
Filter by version

Examples

# Search for pod-related components
mesheryctl component search pod

# Search in specific model
mesheryctl component search --model Kubernetes

Sample Output

COMPONENT              MODEL                VERSION      CATEGORY
Pod                    Kubernetes           v1.28.0      Orchestration
PodDisruptionBudget    Kubernetes           v1.28.0      Orchestration
PodMonitor             Prometheus           v2.45.0      Observability

Found: 3 components

Count Components

Display the total number of registered components.

Usage

mesheryctl component --count

Example Output

Total components: 1250

Component Properties

Components include the following key properties:

Basic Information

  • Name - Component identifier (e.g., Pod, Service)
  • Kind - Component type within its model
  • Version - Component version (may differ from model version)
  • Model - Parent model the component belongs to

Schema Definition

  • Properties - JSON Schema defining component structure
  • Required - Required fields for the component
  • Defaults - Default values for optional fields

Metadata

  • Category - Component category (inherited from model)
  • IsNamespaced - Whether component is namespace-scoped
  • Published - Publication status in registry
  • Capabilities - Special capabilities the component provides

Component Categories

Components are categorized by their parent model:
  • Orchestration - Container orchestration (Pods, Deployments, Services)
  • Service Mesh - Service mesh primitives (VirtualService, DestinationRule)
  • Observability - Monitoring components (ServiceMonitor, PodMonitor)
  • Network - Networking components (Ingress, NetworkPolicy)
  • Security - Security components (SecurityPolicy, Certificate)
  • Storage - Storage components (PersistentVolume, StorageClass)
  • Database - Database components (PostgreSQL, Redis)

Use Cases

Find Available Kubernetes Components

# List all Kubernetes components
mesheryctl component search --model Kubernetes

# View specific component schema
mesheryctl component view Deployment --model Kubernetes -o json

Explore Service Mesh Components

# Search Istio components
mesheryctl component search --model Istio

# View VirtualService definition
mesheryctl component view VirtualService --model Istio

Check Component Availability

# Check if component exists
mesheryctl component search MyComponent

# View details if found
mesheryctl component view MyComponent

Working with Component Schemas

Component schemas define the structure and validation rules:
# Example component schema
schema:
  properties:
    apiVersion:
      type: string
      default: v1
    kind:
      type: string
      const: Pod
    metadata:
      type: object
      properties:
        name:
          type: string
        namespace:
          type: string
    spec:
      type: object
      properties:
        containers:
          type: array
          items:
            type: object
  required:
    - apiVersion
    - kind
    - metadata
    - spec

Troubleshooting

Component Not Found

# List all available components
mesheryctl component list

# Search with partial name
mesheryctl component search partial-name

# Check specific model
mesheryctl component list --model MyModel

Too Many Results

# Use pagination
mesheryctl component list --page-size 100

# Filter by model
mesheryctl component search my-component --model Kubernetes

# Use specific search terms
mesheryctl component search "exact component name"

Schema Validation

# View component schema
mesheryctl component view MyComponent -o json

# Check required properties
mesheryctl component view MyComponent | grep -A 10 "required:"

See Also