본문 바로가기

728x90

전체 글

[kubernetes] kubectl run 명령 kubectl run 명령 Create and run a particular image in a pod. 사용법 Examples: # Start a nginx pod kubectl run nginx --image=nginx # Start a hazelcast pod and let the container expose port 5701 kubectl run hazelcast --image=hazelcast/hazelcast --port=5701 # Start a hazelcast pod and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container kubectl run hazelcast --imag.. 더보기
[kubernetes] kubectl explain 명령 kubectl explain 명령 List the fields for supported resources. 사용법 Examples: # Get the documentation of the resource and its fields kubectl explain pods # Get the documentation of a specific field of a resource kubectl explain pods.spec.containers Options: --api-version='': Get different explanations for particular API version (API group/version) --recursive=false: Print the fields of fields (Curre.. 더보기
[kubernetes] kubectl get events 명령 kubectl get events 명령 Display one or many resources. 사용법 Examples: # List all pods in ps output format kubectl get pods # List all pods in ps output format with more information (such as node name) kubectl get pods -o wide # List a single replication controller with specified NAME in ps output format kubectl get replicationcontroller web # List deployments in JSON output format, in the "v1" vers.. 더보기
[mac] macOS에 kubectl 설치 및 설정 kubectl 설치 및 설정 최신 버전(1.25.x) brew install kubectl kubectl version --client --short $ kubectl version --client --short Flag --short has been deprecated, and will be removed in the future. The --short output will become the default. Client Version: v1.25.1 Kustomize Version: v4.5.7 1.22.10 버전 설치 sudo curl -fsSL https://storage.googleapis.com/kubernetes-release/release/v1.22.10/bin/darwin/amd64/ku.. 더보기
[kubernetes] ReplicationController kubernetes ReplicationController 레플리케이션 컨트롤러 생성 - 레이블 셀렉터 - 파드 템플릿 - 복제본 수 nginx-rc.yaml 편집 vim nginx-rc.yaml apiVersion: v1 kind: ReplicationController metadata: name: nginx-rc spec: replicas: 3 selector: app: webserver env: prod template: metadata: name: nginx-pod labels: app: webserver env: prod spec: containers: - name: nginx-container image: nginx:latest ports: - containerPort: 8080 kubectl.. 더보기
[kubernetes] minikube를 이용한 kubernetes 클러스터 배포 minikube를 이용한 kubernetes 클러스터 배포 minikube - kubernetes cluster 구성 도구 1. KVM install https://help.ubuntu.com/community/KVM/Installation sudo apt-get install qemu-kvm libvirt-daemon-system libvirt-clients bridge-utils sudo adduser `id -un` libvirt sudo adduser `id -un` kvm sudo adduser `id -un` libvirt-qemu sudo reboot systemctl is-active libvirtd 2. minikube install https://minikube.sigs.k8s.io/d.. 더보기
Vagrant를 사용하여 Ubuntu 가상 머신을 설치하고 배포하는 방법 Vagrant를 사용하여 Ubuntu 가상 머신을 설치하고 배포하는 방법 테스트 환경 $ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.4 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.4 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy.. 더보기
[리눅스] Ubuntu 20.04에 VirtualBox를 설치하는 방법 Ubuntu 20.04에 VirtualBox를 설치하는 방법 테스트 환경 $ cat /etc/os-release NAME="Ubuntu" VERSION="20.04.4 LTS (Focal Fossa)" ID=ubuntu ID_LIKE=debian PRETTY_NAME="Ubuntu 20.04.4 LTS" VERSION_ID="20.04" HOME_URL="https://www.ubuntu.com/" SUPPORT_URL="https://help.ubuntu.com/" BUG_REPORT_URL="https://bugs.launchpad.net/ubuntu/" PRIVACY_POLICY_URL="https://www.ubuntu.com/legal/terms-and-policies/privacy-policy.. 더보기

728x90