DigitalOcean 命令行客户端
doctl 管理 DigitalOcean 的 Droplet、Kubernetes、数据库、App Platform 等资源。它使用 API token 认证,支持多 context 和 JSON 输出。
doctl auth init
doctl auth list
doctl account get
doctl compute droplet list
doctl compute droplet create web \
--image ubuntu-24-04 --size s-1vcpu-1gb --region sgp1
doctl compute droplet delete <droplet-id>
doctl kubernetes cluster list
doctl kubernetes cluster kubeconfig save my-cluster
doctl databases list
doctl apps list
doctl compute region list
doctl compute size list
doctl auth list;操作错账号的代价很高。--size、--region、--image 都是 slug;用 list 命令查可用值。kubeconfig save 会合并到现有配置;冲突时确认 context 名称。--output json 并固定字段。hcloud — Hetzner Cloud CLIkubectl — Kubernetes 集群操作terraform — 声明式管理资源