CLI Reference
Command-line reference for porchctl
This section provides reference documentation for interacting with Porch through its command-line interface (CLI) or through the Kubernetes API.
The porchctl command-line tool provides commands for managing Porch repositories and packages. It communicates with the Porch API server to perform operations like:
Quick Links:
You can generate an OpenAPI specification for Porch’s APIs and explore them interactively:
1. Extract OpenAPI specs from your cluster:
# Get config.porch.kpt.dev API spec
kubectl get --raw /openapi/v3/apis/config.porch.kpt.dev/v1alpha1 | jq '.' > config-porch-openapi.json
# Get porch.kpt.dev API spec
kubectl get --raw /openapi/v3/apis/porch.kpt.dev/v1alpha1 | jq '.' > porch-openapi.json
# Combine both specs into single file
jq -s '.[0] * .[1]' config-porch-openapi.json porch-openapi.json > combined-porch-openapi.json
2. Explore the API interactively:
Open
Swagger Editor in your browser and import the combined-porch-openapi.json file to:
The complete field-level reference for Porch’s Aggregated API Resources and Kubernetes Custom Resource Definitions (CRDs):
porch.kpt.dev/v1alpha1 resources are Aggregated API Resources (not Custom Resources defined in a CRD) whilst the config.porch.kpt.dev/v1alpha1 resources are Custom Resources.
The following lists provide a summary of the resources documented in the generated API and CRD guide:
porch.kpt.dev/v1alpha1:
config.porch.kpt.dev/v1alpha1:
The API reference provides detailed information about:
Quick Links:
Most Porch operations can be performed with either porchctl or kubectl. For example:
With porchctl:
porchctl rpkg get --namespace default
With kubectl:
kubectl get packagerevisions -n default
Choose the tool that best fits your workflow and automation needs.
Command-line reference for porchctl
API reference documentation for Porch resources
CRD reference documentation for Porch resources