Skip to content

Examples

Real-world examples for common xcsh use cases.

ExampleDescription
AI Assistant GuideUsing the AI assistant for natural language queries
Load BalancersHTTP and TCP load balancer configuration
Cloud SitesAWS and Azure site deployment
Terminal window
xcsh tenant_and_identity list namespace

Output:

NAME DESCRIPTION
default Default namespace
shared Shared namespace
system System namespace
Terminal window
xcsh virtual create http_loadbalancer -f lb.yaml
Terminal window
xcsh virtual get http_loadbalancer example-lb -o yaml

Output:

metadata:
name: example-lb
namespace: default
spec:
domains:
- example.com
Terminal window
xcsh virtual delete http_loadbalancer example-lb -ns example-namespace
  1. Create an origin pool:
Terminal window
xcsh virtual create origin_pool -f origin-pool.yaml
  1. Create a health check:
Terminal window
xcsh virtual create healthcheck -f healthcheck.yaml
  1. Create the load balancer:
Terminal window
xcsh virtual create http_loadbalancer -f lb.yaml
  1. Verify deployment:
Terminal window
xcsh virtual get http_loadbalancer example-lb -ns example-namespace
  1. Export current configuration:
Terminal window
xcsh virtual get http_loadbalancer example-lb -ns example-namespace -o yaml > lb.yaml
  1. Edit the file as needed

  2. Apply changes:

Terminal window
xcsh virtual replace http_loadbalancer example-lb -ns example-namespace -f lb.yaml
Terminal window
# Delete load balancer
xcsh virtual delete http_loadbalancer example-lb -ns example-namespace
# Delete origin pool
xcsh virtual delete origin_pool example-pool -ns example-namespace
# Delete health check
xcsh virtual delete healthcheck example-hc -ns example-namespace