🚀 Socket Launch Week Day 5:Introducing Repository Access Permissions and Custom Roles.Learn more
Sign In

@bifos/nhncloud-cli

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@bifos/nhncloud-cli - npm Package Compare versions

Comparing version
0.5.1
to
0.6.0
+1
-1
package.json
{
"name": "@bifos/nhncloud-cli",
"version": "0.5.1",
"version": "0.6.0",
"description": "CLI tool for NHN Cloud services — AI agent & terminal friendly",

@@ -5,0 +5,0 @@ "keywords": [

# nhncloud-cli
NHN Cloud 서비스를 AWS CLI 방식으로 호출하는 통합 CLI.
현재 `configure`, `logncrash search/send` (Log & Crash 로그 검색·전송), `deploy` (배포·바이너리 조회·업로드·다운로드), `instance` (Compute 인스턴스 목록·발급·전원 제어·타입 변경·키페어 관리·이미지·가용성 영역 조회·볼륨 연결 포함), `network` (VPC·서브넷 목록 조회), `volume` (Block Storage 볼륨 목록·조회·생성), `ncr` (NHN Container Registry 레지스트리 목록·조회·이미지 목록·태그 목록) 명령을 지원한다.
현재 81개 명령을 지원한다.
`configure`, `logncrash search/send/export`, `deploy`, `instance`, `network`, `volume`, `floatingip`, `ncr`, `nks` 명령으로 NHN Cloud 서비스를 조회·운영할 수 있다.

@@ -231,3 +232,16 @@ ## 설치

| `ncr tags` | tag 배열 |
| `nks supports` | 지원 Kubernetes version / event type 객체 |
| `nks cluster list` | cluster 배열 |
| `nks cluster events` | event 배열 |
| `nks nodegroup list` | nodegroup 배열 |
| `nks addon-type list` | addon type 배열 |
| `nks addon list` | addon 배열 |
| `nks cluster addon list` | cluster addon 배열 |
NKS의 단건 조회는 API 객체를 그대로 반환한다.
예를 들어 `nks cluster get`, `nks cluster event`, `nks nodegroup get`, `nks addon-type get`, `nks addon get`, `nks cluster addon get`, `nks cluster ipacl`, `nks nodegroup autoscale` 은 table 출력용 최소 컬럼을 만들고 `--json` 에서는 raw 객체를 보존한다.
NKS 쓰기 명령 중 생성·resize·설정 변경·노드 action·애드온 변경은 `{ uuid }` 응답을 반환한다.
삭제 명령은 성공 메시지만 stderr에 쓰고 stdout은 비운다.
`nks cluster kubeconfig` 는 kubeconfig 문자열을 stdout 또는 파일로 저장한다.
예를 들어 `instance get --json`은 `.server.status`가 아니라 `.status`를 읽는다.

@@ -548,2 +562,78 @@

### NHN Kubernetes Service (NKS)
NKS는 `iaas` 자격증명으로 Keystone 토큰을 발급하고 `container-infra` API를 호출한다.
지원 region은 `kr1`, `kr2`, `kr3` 이다.
```bash
# 지원 Kubernetes version / event type 조회
nhncloud nks supports
# 클러스터와 노드 그룹 조회
nhncloud nks cluster list
nhncloud nks cluster get <cluster>
nhncloud nks cluster events <cluster>
nhncloud nks cluster event <cluster> <event>
nhncloud nks cluster ipacl <cluster>
nhncloud nks nodegroup list <cluster>
nhncloud nks nodegroup get <cluster> <nodegroup>
nhncloud nks nodegroup autoscale <cluster> <nodegroup>
# kubeconfig stdout 출력 또는 mode 0600 파일 저장
nhncloud nks cluster kubeconfig <cluster>
nhncloud nks cluster kubeconfig <cluster> --output ./kubeconfig
nhncloud nks cluster kubeconfig <cluster> --output ./kubeconfig --force
# 애드온 조회
nhncloud nks addon-type list
nhncloud nks addon-type get <addon-type>
nhncloud nks addon list --k8s-version v1.30.1
nhncloud nks addon get <addon>
nhncloud nks cluster addon list <cluster>
nhncloud nks cluster addon get <cluster> <addon>
```
복잡한 쓰기 작업은 공식 API payload를 JSON 파일로 전달한다.
삭제·제거 명령은 비대화형 환경에서 `--yes` 가 필요하다.
```bash
# 클러스터 / 노드 그룹 생성
nhncloud nks cluster create --file ./cluster-create.json
nhncloud nks nodegroup create <cluster> --file ./nodegroup-create.json
# resize / upgrade
nhncloud nks cluster resize <cluster> --nodegroup worker --node-count 3
nhncloud nks nodegroup upgrade <cluster> worker --version v1.30.1
# 삭제 / 노드 action
nhncloud nks cluster delete <cluster> --yes
nhncloud nks nodegroup delete <cluster> worker --yes
nhncloud nks nodegroup stop-node <cluster> worker --nodes node-1,node-2
nhncloud nks nodegroup start-node <cluster> worker --nodes node-1,node-2
# 애드온 설치 / 업데이트 / 제거
nhncloud nks cluster addon install <cluster> \
--name coredns \
--version 1.0.0 \
--resolve-conflicts overwrite
nhncloud nks cluster addon update <cluster> coredns \
--version 1.0.1 \
--resolve-conflicts preserve
nhncloud nks cluster addon remove <cluster> coredns --yes
# payload 파일 기반 변경
nhncloud nks cluster set-ipacl <cluster> --file ./ipacl.json
nhncloud nks cluster renew-certificate <cluster> --term-of-validity 3
nhncloud nks cluster update-sgw <cluster> --ncr-sgw <uuid> --obs-sgw <uuid>
nhncloud nks cluster set-control-plane-log <cluster> --file ./control-plane-log.json
nhncloud nks nodegroup set-autoscale <cluster> worker --file ./autoscale.json
nhncloud nks nodegroup set-metric-autoscale <cluster> worker --file ./metric-autoscale.json
nhncloud nks nodegroup set-userscript <cluster> worker --file ./userscript.sh
nhncloud nks nodegroup update-flavor <cluster> worker --flavor <flavor-uuid>
nhncloud nks nodegroup set-fip-auto-bind <cluster> worker --file ./fip-auto-bind.json
nhncloud nks nodegroup set-labels <cluster> worker --file ./labels.json
```
## 개발

@@ -558,2 +648,3 @@

node dist/index.js ncr --help
node dist/index.js nks --help
```
---
name: nhncloud-cli
description: NHN Cloud 서비스 CLI. 자격증명 설정(configure), Log & Crash 로그 검색·전송(logncrash search/send), Deploy 배포 실행·바이너리 그룹·바이너리 목록 조회·업로드·다운로드(deploy upload/download), Compute 인스턴스 관리(instance — 목록·발급·전원 제어·타입 변경(resize/resize-confirm/resize-revert)·키페어·이미지·가용성 영역 조회·볼륨 연결(instance volume attach/detach, instance volumes)), VPC·서브넷 조회(network list/subnet list), Block Storage 볼륨 관리(volume list/get/create), Floating IP 관리(floatingip list/create/delete), NHN Container Registry 레지스트리·이미지·태그 조회(ncr list/get/images/tags) 등 NHN Cloud PaaS API 를 터미널·AI 에이전트에서 호출한다.
description: NHN Cloud 서비스 CLI. 자격증명 설정(configure), Log & Crash 로그 검색·전송(logncrash search/send/export), Deploy 배포 실행·바이너리 그룹·바이너리 목록 조회·업로드·다운로드(deploy upload/download), Compute 인스턴스 관리(instance), VPC·서브넷 조회(network), Block Storage(volume), Floating IP(floatingip), NHN Container Registry(ncr), NHN Kubernetes Service(nks supports/cluster/nodegroup/addon/kubeconfig) 등 NHN Cloud API 를 터미널·AI 에이전트에서 호출한다.
---

@@ -8,4 +8,4 @@

NHN Cloud PaaS 서비스를 AWS CLI 방식으로 호출하는 TypeScript CLI.
`configure`, `logncrash search/send`, `deploy`, `instance` (전원 제어·keypair·볼륨 연결 포함), `network` (VPC·서브넷 조회), `volume` (Block Storage 볼륨 목록·조회·생성), `floatingip` (공인 IP 관리), `ncr` (NHN Container Registry 레지스트리·이미지·태그 조회) 명령을 지원한다.
NHN Cloud 서비스를 AWS CLI 방식으로 호출하는 TypeScript CLI.
`configure`, `logncrash search/send/export`, `deploy`, `instance`, `network`, `volume`, `floatingip`, `ncr`, `nks` 명령을 지원한다.

@@ -112,3 +112,16 @@ ## 설치

| `ncr tags` | tag 배열 |
| `nks supports` | 지원 Kubernetes version / event type 객체 |
| `nks cluster list` | cluster 배열 |
| `nks cluster events` | event 배열 |
| `nks nodegroup list` | nodegroup 배열 |
| `nks addon-type list` | addon type 배열 |
| `nks addon list` | addon 배열 |
| `nks cluster addon list` | cluster addon 배열 |
NKS 단건 조회는 API 객체를 그대로 반환한다.
예를 들어 `nks cluster get`, `nks cluster event`, `nks nodegroup get`, `nks addon-type get`, `nks addon get`, `nks cluster addon get`, `nks cluster ipacl`, `nks nodegroup autoscale` 은 table 출력용 최소 컬럼을 만들고 `--json` 에서는 raw 객체를 보존한다.
NKS 쓰기 명령 중 생성·resize·설정 변경·노드 action·애드온 변경은 `{ uuid }` 응답을 반환한다.
삭제 명령은 성공 메시지만 stderr에 쓰고 stdout은 비운다.
`nks cluster kubeconfig` 는 kubeconfig 문자열을 stdout 또는 파일로 저장한다.
예: `nhncloud instance get <instance-id> --json`은 `.server.status`가 아니라 `.status`를 읽는다.

@@ -138,2 +151,8 @@

| NCR 태그 목록 (JSON) | `nhncloud ncr tags <registry> <repository> --json` |
| NKS 지원 버전 조회 | `nhncloud nks supports --json` |
| NKS 클러스터 목록 조회 | `nhncloud nks cluster list --json` |
| NKS kubeconfig 저장 | `nhncloud nks cluster kubeconfig <cluster> --output ./kubeconfig` |
| NKS 노드 그룹 목록 조회 | `nhncloud nks nodegroup list <cluster> --json` |
| NKS 애드온 목록 조회 | `nhncloud nks addon list --k8s-version v1.30.1 --json` |
| NKS 클러스터 애드온 설치 | `nhncloud nks cluster addon install <cluster> --name coredns --version 1.0.0 --resolve-conflicts overwrite` |

@@ -747,1 +766,81 @@ ## logncrash search 옵션

| NCR API 오류 | 1 (API_ERROR) |
## nks — NHN Kubernetes Service 관리
NKS는 `iaas` 자격증명으로 Keystone 토큰을 발급하고 `container-infra` API를 호출한다.
AI 에이전트는 조회 작업에 `--json`을 우선 사용한다.
지원 region은 `kr1`, `kr2`, `kr3` 이다.
### 조회 시나리오
| 의도 | 커맨드 |
|------|--------|
| 지원 Kubernetes version / event type 확인 | `nhncloud nks supports --json` |
| 클러스터 목록 조회 | `nhncloud nks cluster list --json` |
| 클러스터 상세 조회 | `nhncloud nks cluster get <cluster> --json` |
| 작업 이력 조회 | `nhncloud nks cluster events <cluster> --json` |
| 작업 이력 단건 조회 | `nhncloud nks cluster event <cluster> <event> --json` |
| API endpoint IP ACL 조회 | `nhncloud nks cluster ipacl <cluster> --json` |
| kubeconfig stdout 출력 | `nhncloud nks cluster kubeconfig <cluster>` |
| kubeconfig 파일 저장 | `nhncloud nks cluster kubeconfig <cluster> --output ./kubeconfig` |
| 노드 그룹 목록 조회 | `nhncloud nks nodegroup list <cluster> --json` |
| 노드 그룹 autoscale 조회 | `nhncloud nks nodegroup autoscale <cluster> <nodegroup> --json` |
| 애드온 타입 조회 | `nhncloud nks addon-type list --json` |
| 애드온 타입 단건 조회 | `nhncloud nks addon-type get <addon-type> --json` |
| 설치 가능 애드온 조회 | `nhncloud nks addon list --k8s-version v1.30.1 --json` |
| 설치 가능 애드온 단건 조회 | `nhncloud nks addon get <addon> --json` |
| 클러스터 설치 애드온 조회 | `nhncloud nks cluster addon list <cluster> --json` |
| 클러스터 설치 애드온 단건 조회 | `nhncloud nks cluster addon get <cluster> <addon> --json` |
### 쓰기 시나리오
복잡한 생성·변경 작업은 공식 API payload를 JSON 파일로 전달한다.
삭제·제거 명령은 비대화형 환경에서 `--yes` 가 필요하다.
payload 원문에는 appkey 같은 민감값이 들어갈 수 있으므로 로그에 출력하지 않는다.
```bash
# 생성
nhncloud nks cluster create --file ./cluster-create.json
nhncloud nks nodegroup create <cluster> --file ./nodegroup-create.json
# 클러스터 변경
nhncloud nks cluster resize <cluster> --nodegroup worker --node-count 3
nhncloud nks cluster set-ipacl <cluster> --file ./ipacl.json
nhncloud nks cluster renew-certificate <cluster> --term-of-validity 3
nhncloud nks cluster update-sgw <cluster> --ncr-sgw <uuid> --obs-sgw <uuid>
nhncloud nks cluster set-control-plane-log <cluster> --file ./control-plane-log.json
# 노드 그룹 변경
nhncloud nks nodegroup stop-node <cluster> worker --nodes node-1,node-2
nhncloud nks nodegroup start-node <cluster> worker --nodes node-1,node-2
nhncloud nks nodegroup set-autoscale <cluster> worker --file ./autoscale.json
nhncloud nks nodegroup set-metric-autoscale <cluster> worker --file ./metric-autoscale.json
nhncloud nks nodegroup upgrade <cluster> worker --version v1.30.1
nhncloud nks nodegroup set-userscript <cluster> worker --file ./userscript.sh
nhncloud nks nodegroup update-flavor <cluster> worker --flavor <flavor-uuid>
nhncloud nks nodegroup set-fip-auto-bind <cluster> worker --file ./fip-auto-bind.json
nhncloud nks nodegroup set-labels <cluster> worker --file ./labels.json
# 애드온 변경
nhncloud nks cluster addon install <cluster> \
--name coredns \
--version 1.0.0 \
--resolve-conflicts overwrite
nhncloud nks cluster addon update <cluster> coredns \
--version 1.0.1 \
--resolve-conflicts preserve
nhncloud nks cluster addon remove <cluster> coredns --yes
```
### nks 에러 코드
| 상황 | exit code |
|------|-----------|
| `iaas` 자격증명 누락·불완전 | 4 (CONFIG_ERROR) |
| Keystone 또는 NKS 인증 실패 (401/403) | 2 (AUTH_ERROR) |
| 지원하지 않는 NKS region | 3 (PARAM_ERROR) |
| payload JSON 파일 파싱 실패 | 3 (PARAM_ERROR) |
| 위험 명령에서 비대화형 `--yes` 누락 | 3 (PARAM_ERROR) |
| NKS API 오류 / 응답 형식 불일치 | 1 (API_ERROR) |

Sorry, the diff of this file is too big to display