본문 바로가기

728x90

Kubernetes

C276x260 [kubernetes] kubectl delete 명령 kubectl delete 명령 Delete resources by file names, stdin, resources and names, or by resources and label selector. 사용법 Examples: # Delete a pod using the type and name specified in pod.json kubectl delete -f ./pod.json # Delete resources from a directory containing kustomization.yaml - e.g. dir/kustomization.yaml kubectl delete -k dir # Delete a pod based on the type and name in the JSON passed i.. 더보기
C276x260 [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.. 더보기
C276x260 [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.. 더보기
C276x260 [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.. 더보기
C276x260 [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.. 더보기
C276x260 [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.. 더보기
C276x260 CentOS 7에서 Kubernetes를 제거하는 방법 CentOS 7에서 Kubernetes를 제거하는 방법 Docker Container, Images, Volumes 제거 Kubernetes로 생성한 Docker 컨테이너, 이미지, 볼륨들을 제거합니다. 주의: 이 단계를 수행하면 모든 Docker 컨테이너, 이미지, 볼륨이 삭제되므로, 다른 서비스에 영향을 줄 수 있습니다 docker rm -f -v $(docker ps -q) 더보기 sudo docker stop $(sudo docker ps -aq) sudo docker rm $(sudo docker ps -aq) sudo docker rmi $(sudo docker images -q) sudo docker volume rm $(sudo docker volume ls -q) Kubernetes와 D.. 더보기
C276x260 쿠버네티스 실습 환경(플레이그라운드) 쿠버네티스 실습 환경(플레이그라운드) O'Reilly Katacoda home https://katacoda.com 로그인 필요없음 운영체제 : Ubuntu"20.04.2 LTS (Focal Fossa) Play with Kubernetes https://labs.play-with-k8s.com docker 또는 github 로그인 필요 운영체제 : CentOS Linux 7 (Core) 세션 및 모든 해당 인스턴스는 04:00:00 시간 후에 삭제됩니다. 더보기

728x90