Getting Started with ACP CLI
TOC
About ACP CLI
With ACP CLI (ac), you can manage ACP platforms and clusters from a terminal. ACP CLI provides a kubectl-like experience optimized for ACP's centralized, proxy-based multi-cluster architecture.
ACP CLI is ideal in the following situations:
- Working with ACP platforms and multiple clusters from a unified interface
- Working directly with project source code Scripting ACP platform operations and automating workflows
- Managing projects while restricted by bandwidth resources and the web console is unavailable
- Managing applications across different ACP environments (production, staging, development)
Installation
Installing from Binary
You can install ACP CLI (ac) by downloading the binary for your operating system.
Follow these steps to download the correct package:
- Open the Alauda Cloud download page in your browser.
- Choose CLI Tools to enter the CLI download page.
- Locate the ACP CLI (ac) section.
- Download the binary that matches your operating system and CPU architecture (for example,
ac-linux-amd64).
Installing ACP CLI on Linux
- Complete the download steps above to obtain the Linux binary (for example,
ac-linux-amd64orac-linux-arm64). - Make the binary executable:
Replace
ac-linux-amd64with the filename you downloaded. - Move the binary into your PATH and rename it to
ac:Adjust the filename if you downloaded a different variant. - Verify the installation:
Installing ACP CLI on macOS
- Complete the download steps above to obtain the macOS binary (for example,
ac-darwin-amd64orac-darwin-arm64). - Make the binary executable:
Replace
ac-darwin-amd64with the filename you downloaded. - Move the binary into your PATH and rename it to
ac:Adjust the filename if you downloaded a different variant. - Verify the installation:
Installing ACP CLI on Windows
- Complete the download steps above to obtain the Windows binary (for example,
ac-windows-amd64.exe). - Move the
ac-windows-amd64.exebinary to a directory in your PATH and rename it toac.exeif desired. Keep the original name if you prefer; just ensure the file's directory is in your PATH. - Verify the installation:
First Steps
Logging into ACP Platform
The ac login command is your entry point for connecting to ACP platforms. It handles authentication and automatically configures access to all available clusters.
Interactive Login
For the simplest experience, run ac login without parameters and follow the interactive prompts:
Login Using Parameters
You can also provide parameters directly:
Login Using Environment Variables
For automation and scripting, use environment variables:
Quick Configuration Management
Once logged in, ACP CLI provides convenient commands for daily operations:
View Current Status
Use ac namespace to see your current operational context:
Switch Clusters
Switch between clusters within your current session:
Switch Namespaces
Change your active namespace:
Basic Resource Operations
Use standard kubectl commands to manage resources:
Managing Multiple Environments
For users working with multiple ACP platforms:
List all configured sessions:
Switch between platforms:
Your First Application
Let's create and view a simple application to verify everything is working:
Create a Simple Pod
-
Create a basic pod configuration:
-
Apply the configuration:
View Application Status
-
List pods to see your application:
-
Get detailed information about the pod:
-
View pod logs:
Clean Up
Remove the test pod when finished:
Getting Help
Built-in Help System
ACP CLI provides comprehensive help at multiple levels:
General Help
Get an overview of all available commands:
Command-Specific Help
Get detailed help for any specific command:
Resource Documentation
Get information about Kubernetes resources:
Logging Out
When you're finished working or need to switch to different credentials, use the logout command:
The logout command:
- Removes authentication tokens from your local configuration
- Cleans up all cluster and context entries for the session
- Revoke currently used tokens in the ACP
- Ensures no orphaned configuration remains