-
Notifications
You must be signed in to change notification settings - Fork 1
Tutorial Deploying First Pod
This tutorial walks you through deploying your first pod from scratch, explaining each step along the way.
- Stark Orchestrator installed and running (see Installation)
- CLI built and accessible
- An admin account created
We'll accomplish the following:
- Start a node agent
- Create and bundle a simple pack
- Register the pack
- Deploy a pod
- Verify it's running
First, ensure you're logged in:
node packages/cli/dist/index.js auth login --email your@email.comVerify with:
node packages/cli/dist/index.js auth whoamiOpen a new terminal and start a node agent:
node packages/cli/dist/index.js node agent start \
--url wss://localhost/ws \
--name tutorial-node \
--label env=tutorial \
--cpu 1000 \
--memory 512Keep this terminal running. The node is now connected and waiting for pods.
In your original terminal:
node packages/cli/dist/index.js node listYou should see tutorial-node listed with status Ready.
Create a file called hello-pod.js:
// hello-pod.js
console.log('=================================');
console.log(' Hello from Stark Pod!');
console.log(' Running at:', new Date().toISOString());
console.log('=================================');node packages/cli/dist/index.js pack bundle ./hello-pod.js --out ./hello-bundle.jsThis creates a self-contained bundle ready for service.
node packages/cli/dist/index.js pack register ./hello-bundle.js \
--name hello-pod \
--ver 1.0.0 \
--runtime nodeVerify registration:
node packages/cli/dist/index.js pack listNow for the exciting part—deploy the pod:
node packages/cli/dist/index.js pod create \
--pack hello-pod \
--node tutorial-nodeThis will return a pod ID like pod-abc123.
node packages/cli/dist/index.js pod listYou should see your pod with status Running or Succeeded.
For detailed status:
node packages/cli/dist/index.js pod status <pod-id>Check the node agent terminal. You should see:
=================================
Hello from Stark Pod!
Running at: 2026-02-02T10:30:00.000Z
=================================
🎉 Congratulations! You've deployed your first pod!
- Pack Registration: Your JavaScript code was stored in the pack registry with version 1.0.0
-
Pod Creation: You requested a pod running
hello-podontutorial-node -
Scheduling: The scheduler verified
tutorial-nodewas available and had sufficient resources - Assignment: The orchestrator sent a pod assignment to the node via WebSocket
- Execution: The node agent executed your pack code
- Status Update: The node reported the pod status back to the orchestrator
node packages/cli/dist/index.js pod create \
--pack hello-pod \
--node-selector env=tutorial \
--priority 200 \
--label app=helloFor managed pods with auto-healing:
node packages/cli/dist/index.js service create hello-service \
--pack hello-pod \
--replicas 2Register a new version and roll back:
# Create updated version
echo 'console.log("Hello v2!")' > hello-pod-v2.js
node packages/cli/dist/index.js pack bundle ./hello-pod-v2.js --out ./hello-v2.js
node packages/cli/dist/index.js pack register ./hello-v2.js --name hello-pod --ver 2.0.0 --runtime node
# Rollback if needed
node packages/cli/dist/index.js pod rollback <pod-id> --ver 1.0.0# Delete the pod
node packages/cli/dist/index.js pod delete <pod-id>
# Stop the node agent (Ctrl+C in the node terminal)- Verify the node is online:
node list - Check node labels match selectors
- Verify node has sufficient resources
- Ensure the source file exists and is valid JavaScript
- Check file permissions
- Verify the orchestrator is running
- Use
-kflag for self-signed certificates - Check the WebSocket URL is correct
- Home
- Getting Started
- Concepts
- Core Architecture
- Tutorials
- Reference
- Advanced Topics
- Contribution