디지털오션 CLI 명령어와 워크플로우에 대한 포괄적인 가이드로, 드롭렛, 로드 밸런서, 데이터베이스, 쿠버네티스 클러스터를 관리합니다.
설치 및 인증
| 명령어 | 설명 |
|---|
doctl auth init | 인증 초기화 |
doctl auth list | 인증 컨텍스트 목록 |
doctl auth switch --context CONTEXT_NAME | 인증 컨텍스트 전환 |
doctl account get | 계정 정보 가져오기 |
doctl balance get | 계정 잔액 확인 |
드롭렛 (가상 머신)
드롭렛 관리
| 명령어 | 설명 |
|---|
doctl compute droplet list | 모든 droplets 나열하기 |
doctl compute droplet create mydroplet --size s-1vcpu-1gb --image ubuntu-20-04-x64 --region nyc1 | 드롭렛 생성 |
doctl compute droplet delete DROPLET_ID | 드롭렛 삭제 |
doctl compute droplet get DROPLET_ID | 드롭렛 세부 정보 가져오기 |
doctl compute droplet reboot DROPLET_ID | 드롭렛 재부팅 |
doctl compute droplet power-off DROPLET_ID | 드롭렛 전원 끄기 |
doctl compute droplet power-on DROPLET_ID | 드롭렛 전원 켜기 |
doctl compute droplet shutdown DROPLET_ID | 드롭렛 종료 |
드롭렛 작업
| 명령어 | 설명 |
|---|
doctl compute droplet-action list DROPLET_ID | 드롭렛 작업 목록 |
doctl compute droplet-action resize DROPLET_ID --size s-2vcpu-2gb | 드롭렛 크기 조정 |
doctl compute droplet-action snapshot DROPLET_ID --snapshot-name my-snapshot | 스냅샷 생성 |
doctl compute droplet-action restore DROPLET_ID --image IMAGE_ID | 이미지에서 복원 |
doctl compute droplet-action rebuild DROPLET_ID --image ubuntu-20-04-x64 | 드롭렛 재구축 |
SSH 및 접근
| 명령어 | 설명 |
|---|
doctl compute ssh DROPLET_NAME | droplet에 SSH로 접속하기 |
doctl compute ssh DROPLET_NAME --ssh-user root | 특정 사용자로 SSH 연결하기 |
doctl compute ssh-key list | SSH 키 목록 |
doctl compute ssh-key create --name mykey --public-key-file ~/.ssh/id_rsa.pub | SSH 키 추가 |
doctl compute ssh-key delete KEY_ID | SSH 키 삭제 |
이미지 및 스냅샷
| 명령어 | 설명 |
|---|
doctl compute image list | 모든 이미지 나열하기 |
doctl compute image list --public | 공개 이미지 목록 |
doctl compute image list-user | 사용자 이미지 목록 |
doctl compute image get IMAGE_ID | 이미지 세부 정보 가져오기 |
doctl compute image delete IMAGE_ID | 이미지 삭제 |
doctl compute image update IMAGE_ID --name new-name | 이미지 이름 업데이트 |
볼륨 (블록 스토리지)
| 명령어 | 설명 |
|---|
doctl compute volume list | 모든 볼륨 나열하기 |
doctl compute volume create myvolume --size 100GiB --region nyc1 | 볼륨 생성 |
doctl compute volume delete VOLUME_ID | 볼륨 삭제 |
doctl compute volume attach VOLUME_ID DROPLET_ID | 볼륨을 드롭렛에 연결 |
doctl compute volume detach VOLUME_ID | 볼륨 분리 |
doctl compute volume snapshot VOLUME_ID --snapshot-name my-volume-snapshot | 볼륨 스냅샷 생성 |
로드 밸런서
| 명령어 | 설명 |
|---|
doctl compute load-balancer list | 로드 밸런서 목록 |
doctl compute load-balancer create --name mylb --forwarding-rules entry_protocol:http,entry_port:80,target_protocol:http,target_port:80 --region nyc1 | 로드 밸런서 생성 |
doctl compute load-balancer delete LB_ID | 로드 밸런서 삭제 |
doctl compute load-balancer add-droplets LB_ID --droplet-ids DROPLET_ID1,DROPLET_ID2 | LB에 드롭렛 추가 |
doctl compute load-balancer remove-droplets LB_ID --droplet-ids DROPLET_ID1 | LB에서 방울 제거 |
네트워킹
방화벽
| 명령어 | 설명 |
|---|
doctl compute firewall list | 방화벽 목록 |
doctl compute firewall create --name myfirewall --inbound-rules protocol:tcp,ports:22,sources:0.0.0.0/0 | 방화벽 생성 |
doctl compute firewall delete FIREWALL_ID | 방화벽 삭제 |
doctl compute firewall add-droplets FIREWALL_ID --droplet-ids DROPLET_ID | 방화벽에 droplets 추가 |
doctl compute firewall remove-droplets FIREWALL_ID --droplet-ids DROPLET_ID | 방화벽에서 드롭릿 제거 |
VPC 네트워크
| 명령어 | 설명 |
|---|
doctl vpcs list | VPC 목록 |
doctl vpcs create --name myvpc --region nyc1 | VPC 생성 |
doctl vpcs delete VPC_ID | VPC 삭제 |
doctl vpcs get VPC_ID | VPC 세부 정보 가져오기 |
플로팅 IP
| 명령어 | 설명 |
|---|
doctl compute floating-ip list | 부동 IP 나열 |
doctl compute floating-ip create --region nyc1 | 부동 IP 생성 |
doctl compute floating-ip delete FLOATING_IP | 부동 IP 삭제 |
doctl compute floating-ip-action assign FLOATING_IP DROPLET_ID | 부동 IP 할당 |
doctl compute floating-ip-action unassign FLOATING_IP | 부동 IP 할당 해제 |
쿠버네티스 (DOKS)
클러스터 관리
| 명령어 | 설명 |
|---|
doctl kubernetes cluster list | Kubernetes 클러스터 나열 |
doctl kubernetes cluster create mycluster --region nyc1 --node-pool "name=worker-pool;size=s-2vcpu-2gb;count=3" | 클러스터 생성 |
doctl kubernetes cluster delete CLUSTER_ID | 클러스터 삭제 |
doctl kubernetes cluster get CLUSTER_ID | 클러스터 세부 정보 가져오기 |
doctl kubernetes cluster kubeconfig save CLUSTER_ID | kubeconfig 저장하기 |
노드 풀
| 명령어 | 설명 |
|---|
doctl kubernetes cluster node-pool list CLUSTER_ID | 노드 풀 나열하기 |
doctl kubernetes cluster node-pool create CLUSTER_ID --name new-pool --size s-2vcpu-2gb --count 2 | 노드 풀 생성 |
doctl kubernetes cluster node-pool delete CLUSTER_ID POOL_ID | 노드 풀 삭제 |
doctl kubernetes cluster node-pool resize CLUSTER_ID POOL_ID --count 5 | 노드 풀 크기 조정 |
데이터베이스
데이터베이스 클러스터
| 명령어 | 설명 |
|---|
doctl databases list | 데이터베이스 클러스터 목록 |
doctl databases create mydb --engine mysql --size db-s-1vcpu-1gb --region nyc1 | 데이터베이스 클러스터 생성 |
doctl databases delete DATABASE_ID | 데이터베이스 클러스터 삭제 |
doctl databases get DATABASE_ID | 데이터베이스 세부 정보 가져오기 |
doctl databases resize DATABASE_ID --size db-s-2vcpu-2gb | 데이터베이스 크기 조정 |
데이터베이스 작업
| 명령어 | 설명 |
|---|
doctl databases db list DATABASE_ID | 데이터베이스 목록 |
doctl databases db create DATABASE_ID --name myapp | 데이터베이스 생성 |
doctl databases db delete DATABASE_ID myapp | 데이터베이스 삭제 |
doctl databases user list DATABASE_ID | 데이터베이스 사용자 목록 |
doctl databases user create DATABASE_ID --username myuser | 데이터베이스 사용자 생성 |
데이터베이스 백업
| 명령어 | 설명 |
|---|
doctl databases backups list DATABASE_ID | 백업 목록 |
doctl databases backups restore DATABASE_ID BACKUP_ID | 백업에서 복원 |
스페이스 (객체 스토리지)
| 명령어 | 설명 |
|---|
doctl compute cdn list | CDN 엔드포인트 목록 |
doctl compute cdn create --origin spaces.example.com --domain cdn.example.com | CDN 엔드포인트 생성 |
doctl compute cdn delete CDN_ID | CDN 엔드포인트 삭제 |
앱 플랫폼
앱 관리
| 명령어 | 설명 |
|---|
doctl apps list | 앱 목록 |
doctl apps create --spec app.yaml | 사양에서 앱 생성 |
doctl apps get APP_ID | 앱 세부 정보 가져오기 |
doctl apps delete APP_ID | 앱 삭제 |
doctl apps update APP_ID --spec app.yaml | 앱 업데이트 |
앱 배포
| 명령어 | 설명 |
|---|
doctl apps list-deployments APP_ID | 배포 목록 |
doctl apps get-deployment APP_ID DEPLOYMENT_ID | 배포 세부 정보 가져오기 |
doctl apps logs APP_ID --type build | 빌드 로그 가져오기 |
doctl apps logs APP_ID --type run | 런타임 로그 가져오기 |
모니터링
알림
Would you like me to continue with the remaining sections? I noticed that some sections (3-20) are currently empty. If you have specific content for those sections, I can translate them as well.
| 명령어 | 설명 |
|---|
doctl monitoring alert list | 경고 정책 목록 |
doctl monitoring alert create --spec alert.yaml | 경고 정책 생성 |
doctl monitoring alert delete ALERT_ID | 경고 정책 삭제 |
doctl monitoring alert get ALERT_ID | 알림 세부 정보 가져오기 |
프로젝트
| 명령어 | 설명 |
|---|
doctl projects list | 프로젝트 목록 |
doctl projects create --name myproject --description "My project" | 프로젝트 생성 |
doctl projects get PROJECT_ID | 프로젝트 세부 정보 가져오기 |
doctl projects update PROJECT_ID --name "New name" | 프로젝트 업데이트 |
doctl projects resources list PROJECT_ID | 프로젝트 리소스 목록 |
지역 및 크기
| 명령어 | 설명 |
|---|
doctl compute region list | 사용 가능한 지역 목록 |
doctl compute size list | 사용 가능한 드롭렛 크기 목록 |
doctl kubernetes options regions | Kubernetes 리전 목록 |
doctl kubernetes options versions | Kubernetes 버전 목록 |
doctl databases options engines | 데이터베이스 엔진 목록 |
doctl databases options sizes | 데이터베이스 크기 목록 |