/hcp:hcp-create-agentfrom hcp
Guides deploying HyperShift clusters on bare metal, edge, or disconnected environments using pre-provisioned agents. Automatically invoked when generating agent-based cluster creation commands.
Ships in hcp. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
None: SKILL.md is the whole skill.
This skill provides implementation guidance for creating HyperShift clusters using the Agent provider, which is designed for bare metal and edge deployments where pre-provisioned agents are available.
This skill is automatically invoked by the /hcp:generate agent command to guide the Agent provider cluster creation process.
The Agent provider:
Parse the natural language description for Agent-specific requirements:
Environment Type Detection:
Resource Indicators:
Special Requirements:
Required Parameters:
--agent-namespace: Namespace where agents are located--pull-secret: Path to pull secret file--release-image: OpenShift release image--base-domain: Base domain for the cluster (prompt user if not in description)Smart Defaults by Environment:
Edge Environment:
--control-plane-availability-policy SingleReplica
--node-pool-replicas 1
--arch amd64 # or arm64 if specified
Bare Metal Environment:
--control-plane-availability-policy HighlyAvailable
--node-pool-replicas 3
--auto-repair true
Disconnected Environment:
--render # Always render for review
--image-content-sources /path/to/image-content-sources.yaml
--additional-trust-bundle /path/to/ca-bundle.pem
Required Information Collection:
Cluster Name
🔹 **Cluster Name**: What would you like to name your cluster?
- Must be DNS-compatible (lowercase, hyphens allowed)
- Will be used for resource naming
- Example: edge-lab-01, production-cluster
Agent Namespace
🔹 **Agent Namespace**: In which namespace are your agents located?
- This should be the namespace where you registered your agents
- Example: default, agent-system, cluster-agents
- [Press Enter for default: default]
Pull Secret
🔹 **Pull Secret**: Path to your OpenShift pull secret file?
- Required for accessing OpenShift container images
- Download from: https://console.redhat.com/openshift/install/pull-secret
- Example: /home/user/pull-secret.json
Base Domain (if not specified in description)
🔹 **Base Domain**: What base domain should be used for cluster DNS?
- This will be used for cluster API and application routes
- Example: example.com, lab.internal, edge.local
OpenShift Version
🔹 **OpenShift Version**: Which OpenShift version do you want to use?
📋 **Check supported versions**: https://amd64.ocp.releases.ci.openshift.org/
- Enter release image URL: quay.io/openshift-release-dev/ocp-release:X.Y.Z-multi
- [Press Enter for default: quay.io/openshift-release-dev/ocp-release:4.18.0-multi]
Optional Configuration (based on description analysis):
Architecture (if detected)
🔹 **Architecture**: Detected ARM architecture mention. Confirm architecture:
- amd64 (x86_64)
- arm64 (aarch64)
- [Press Enter for default: amd64]
FIPS Mode (if compliance mentioned)
🔹 **FIPS Mode**: Enable FIPS mode for compliance?
- Required for certain regulatory environments
- May impact performance
- [yes/no] [Press Enter for default: no]
If disconnected/airgapped environment is detected:
Additional Required Information:
Mirror Registry
🔹 **Mirror Registry**: What is your mirror registry domain?
- This registry should contain mirrored OpenShift images
- Example: registry.example.com:5000
Image Content Sources
🔹 **Image Content Sources**: Path to image content sources file?
- Required for mapping official images to mirror registry
- Example: /path/to/image-content-sources.yaml
Additional Trust Bundle (optional)
🔹 **Additional Trust Bundle**: Path to custom CA bundle? (Optional)
- Required if mirror registry uses custom certificates
- Example: /path/to/ca-bundle.pem
- [Press Enter to skip]
Always Use --render for Disconnected:
--render flag to generate manifests for reviewProvide Agent Check Commands:
Before creating the cluster, verify your agents are available:
Check agents in namespace:
kubectl get agents -n <agent-namespace>
Verify agent status:
kubectl describe agents -n <agent-namespace>
Ensure agents are:
- In "Available" state
- Not bound to other clusters
- Meet minimum resource requirements
Basic Agent Cluster Command:
hypershift create cluster agent \
--name <cluster-name> \
--namespace <cluster-name>-ns \
--agent-namespace <agent-namespace> \
--pull-secret <pull-secret-path> \
--release-image <release-image> \
--base-domain <base-domain>
With Environment-Specific Flags:
Edge/Minimal Configuration:
hypershift create cluster agent \
--name edge-cluster \
--namespace edge-cluster-ns \
--agent-namespace default \
--pull-secret /path/to/pull-secret.json \
--release-image quay.io/openshift-release-dev/ocp-release:4.18.0-multi \
--base-domain edge.local \
--control-plane-availability-policy SingleReplica \
--node-pool-replicas 1
Production/HA Configuration:
hypershift create cluster agent \
--name production-cluster \
--namespace production-cluster-ns \
--agent-namespace agent-system \
--pull-secret /path/to/pull-secret.json \
--release-image quay.io/openshift-release-dev/ocp-release:4.18.0-multi \
--base-domain example.com \
--control-plane-availability-policy HighlyAvailable \
--node-pool-replicas 3 \
--auto-repair
Disconnected Configuration:
hypershift create cluster agent \
--name secure-cluster \
--namespace secure-cluster-ns \
--agent-namespace agent-system \
--pull-secret /path/to/pull-secret.json \
--release-image quay.io/openshift-release-dev/ocp-release:4.18.0-multi \
--base-domain internal.example.com \
--image-content-sources /path/to/image-content-sources.yaml \
--additional-trust-bundle /path/to/ca-bundle.pem \
--render
FIPS-Enabled Configuration:
hypershift create cluster agent \
--name compliance-cluster \
--namespace compliance-cluster-ns \
--agent-namespace agent-system \
--pull-secret /path/to/pull-secret.json \
--release-image quay.io/openshift-release-dev/ocp-release:4.18.0-multi \
--base-domain secure.example.com \
--fips
For Disconnected Environments:
Provide additional configuration needed after cluster creation:
## Post-Creation Configuration (Disconnected)
After running the command above (with --render), you'll need to modify the generated manifests:
1. **Add ImageContentSources to HostedCluster:**
```yaml
spec:
imageContentSources:
- source: quay.io/openshift-release-dev/ocp-v4.0-art-dev
mirrors:
- registry.example.com:5000/openshift/release
- source: quay.io/openshift-release-dev/ocp-release
mirrors:
- registry.example.com:5000/openshift/release-images
- source: registry.redhat.io/multicluster-engine
mirrors:
- registry.example.com:5000/openshift/multicluster-engine
```
2. **Disable Default OperatorHub Sources:**
```yaml
spec:
configuration:
operatorhub:
disableAllDefaultSources: true
```
3. **Apply the manifests:**
```bash
kubectl apply -f <rendered-manifest-files>
```
For All Environments:
## Next Steps
1. **Verify agents are available:**
kubectl get agents -n <agent-namespace>
2. **Monitor cluster creation:**
kubectl get hostedcluster -n <cluster-namespace>
kubectl get nodepool -n <cluster-namespace>
3. **Check agent assignment:**
kubectl get agents -n <agent-namespace> -o wide
4. **Access cluster when ready:**
hypershift create kubeconfig --name <cluster-name> --namespace <cluster-namespace>
Scenario: No agents found in specified namespace.
Action:
No agents found in namespace "default".
Please ensure:
1. Agents are registered and visible via `kubectl get agents -A`
2. Agents are in "Available" state
3. Correct namespace specified
Check agents:
kubectl get agents -A
Register new agents using the agent-based installer or manual process.
Scenario: Not enough agents for requested replicas.
Action:
Only 2 agents available, but you requested 3 node replicas.
Options:
1. Reduce node-pool-replicas to 2
2. Register additional agents
3. Use SingleReplica control plane (reduces total requirement)
Would you like me to adjust the configuration?
Scenario: Agents are already assigned to another cluster.
Action:
Some agents are already bound to other clusters.
Available agents: 1
Bound agents: 2
Check agent status:
kubectl describe agents -n <namespace>
Free up agents by deleting unused clusters or register new agents.
Scenario: Can't access release images in disconnected environment.
Action:
Release image access failed. In disconnected environments:
1. Ensure mirror registry contains required images
2. Verify image-content-sources file mapping
3. Check custom CA bundle configuration
4. Validate network connectivity to mirror registry
Mirror required images using:
oc adm release mirror --to <mirror-registry>
❌ Assuming cloud automation
"Create cluster with autoscaling"
✅ Agent provider requires manual agent provisioning
❌ Insufficient agent planning
Not checking agent availability before cluster creation
✅ Always verify sufficient agents are available
❌ Ignoring disconnected requirements
Using public image references in airgapped environment
✅ Configure image content sources and mirror registry to map all public image references to the local mirror
❌ Inadequate resource planning
Using minimal agents for production workloads
✅ Size agents appropriately for expected workloads
Input: "small edge cluster for remote office monitoring"
Analysis:
- Environment: Edge
- Scale: Minimal
- Use case: Monitoring
Generated Command:
hypershift create cluster agent \
--name edge-monitoring \
--namespace edge-monitoring-ns \
--agent-namespace default \
--pull-secret /path/to/pull-secret.json \
--release-image quay.io/openshift-release-dev/ocp-release:4.18.0-multi \
--base-domain edge.local \
--control-plane-availability-policy SingleReplica \
--node-pool-replicas 1
Input: "airgapped production cluster for financial data processing"
Analysis:
- Environment: Disconnected/Secure
- Scale: Production
- Use case: Financial (compliance required)
Generated Command:
hypershift create cluster agent \
--name financial-prod \
--namespace financial-prod-ns \
--agent-namespace secure-agents \
--pull-secret /path/to/pull-secret.json \
--release-image quay.io/openshift-release-dev/ocp-release:4.18.0-multi \
--base-domain secure.financial.internal \
--image-content-sources /path/to/image-content-sources.yaml \
--additional-trust-bundle /path/to/ca-bundle.pem \
--fips \
--render
What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
npx claudepluginhub openshift-eng/ai-helpers --plugin hcp6 skills in this plugin
/hcp-create-awsUse this skill when you need to deploy HyperShift clusters on AWS infrastructure with proper STS credentials, IAM roles, and VPC configuration/hcp-create-azureUse this skill when you need to deploy HyperShift clusters on Microsoft Azure with proper identity configuration and resource management/hcp-create-kubevirtUse this skill when you need to deploy HyperShift clusters on existing Kubernetes clusters using KubeVirt virtualizationOther plugins' skills for the same job