1장. roxctl CLI 시작하기
roxctl
은 Kubernetes용 Red Hat Advanced Cluster Security에서 명령을 실행하기 위한 CLI(명령줄 인터페이스)입니다. 이 항목에서는 roxctl
구문, 작업에 대해 설명하고 몇 가지 일반적인 예제를 제공합니다.
1.1. roxctl CLI 설치
바이너리를 다운로드하여 roxctl
CLI를 설치하거나 컨테이너 이미지에서 roxctl
CLI를 실행할 수 있습니다.
1.1.1. 바이너리를 다운로드하여 roxctl CLI 설치
명령줄 인터페이스에서 roxctl
CLI를 설치하여 Kubernetes용 Red Hat Advanced Cluster Security와 상호 작용할 수 있습니다. Linux, Windows 또는 macOS에 roxctl
을 설치할 수 있습니다.
1.1.1.1. Linux에서 roxctl CLI 설치
다음 절차에 따라 Linux에서 roxctl
CLI 바이너리를 설치할 수 있습니다.
절차
최신 버전의
roxctl
CLI를 다운로드합니다.$ curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Linux/roxctl
roxctl
바이너리를 실행 가능하게 합니다.$ chmod +x roxctl
roxctl
바이너리를PATH
에 있는 디렉터리에 배치합니다.PATH
를 확인하려면 다음 명령을 실행합니다.$ echo $PATH
검증
설치된
roxctl
버전을 확인합니다.$ roxctl version
1.1.1.2. macOS에 roxctl CLI 설치
다음 절차에 따라 macOS에서 roxctl
CLI 바이너리를 설치할 수 있습니다.
절차
최신 버전의
roxctl
CLI를 다운로드합니다.$ curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Darwin/roxctl
바이너리에서 모든 확장 속성을 제거합니다.
$ xattr -c roxctl
roxctl
바이너리를 실행 가능하게 합니다.$ chmod +x roxctl
roxctl
바이너리를PATH
에 있는 디렉터리에 배치합니다.PATH
를 확인하려면 다음 명령을 실행합니다.$ echo $PATH
검증
설치된
roxctl
버전을 확인합니다.$ roxctl version
1.1.1.3. Windows에 roxctl CLI 설치
다음 절차에 따라 Windows에서 roxctl
CLI 바이너리를 설치할 수 있습니다.
절차
최신 버전의
roxctl
CLI를 다운로드합니다.$ curl -O https://mirror.openshift.com/pub/rhacs/assets/4.0.5/bin/Windows/roxctl.exe
검증
설치된
roxctl
버전을 확인합니다.$ roxctl version
1.1.2. 컨테이너에서 roxctl CLI 실행
roxctl
클라이언트는 Red Hat Advanced Cluster Security for Kubernetes roxctl
이미지의 기본 진입점입니다. 컨테이너 이미지에서 roxctl
클라이언트를 실행하려면 다음을 수행합니다.
사전 요구 사항
- 먼저 RHACS 포털에서 인증 토큰을 생성해야 합니다.
절차
registry.redhat.io
레지스트리에 로그인합니다.$ docker login registry.redhat.io
roxctl
CLI의 최신 컨테이너 이미지를 가져옵니다.$ docker pull registry.redhat.io/advanced-cluster-security/rhacs-roxctl-rhel8:4.0.5
CLI를 설치한 후 다음 명령을 사용하여 실행할 수 있습니다.
$ docker run -e ROX_API_TOKEN=$ROX_API_TOKEN \ -it registry.redhat.io/advanced-cluster-security/rhacs-roxctl-rhel8:4.0.5 \ -e $ROX_CENTRAL_ADDRESS <command>
Red Hat Advanced Cluster Security Cloud Service에서 중앙 주소가 필요한 roxctl
명령을 사용하는 경우 Red Hat Hybrid Cloud Console의 인스턴스 세부 정보 섹션에 표시된 Central 인스턴스 주소를 사용합니다. 예를 들어 acs-data-ABCD12345.acs.rhcloud.com
대신 acs-ABCD12345.acs.rhcloud.com
을 사용합니다.
검증
설치된
roxctl
버전을 확인합니다.$ docker run -it registry.redhat.io/advanced-cluster-security/rhacs-roxctl-rhel8:4.0.5 version