일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | ||||
4 | 5 | 6 | 7 | 8 | 9 | 10 |
11 | 12 | 13 | 14 | 15 | 16 | 17 |
18 | 19 | 20 | 21 | 22 | 23 | 24 |
25 | 26 | 27 | 28 | 29 | 30 | 31 |
- mount
- nmcli
- docker
- firewalld
- ssh
- tar
- lvcreate
- yum
- journalctl
- chatGPT
- 랜카드인식불량
- vagrant kubernetes
- vgcreate
- newbingai
- 프로세스
- chmod
- ansible
- pvcreate
- Kubernetes
- 리다이렉션
- 같은폴더
- docker image
- 날짜변경
- HTTPD
- swapon
- permission
- 엑셀파일명변경
- docker network
- M365필터
- MSBing
- Today
- Total
목록kubernetes (19)
becool
9:40 Pod Scheduler node name manifests에서 수동으로 pods를 배치할 노드를 지정 - 스케쥴러의 관여 없음 scale 명령어로 scale out을 실행해도 같은 노드에서 배정됨 (replicaset에 설정된 node name 으로 인하여) node selector 노드의 레이블 지우기 (node 라는 label 항목을 마이너스(-)하는 명령) $ kubectl label node kube-node2 node- affinity 파드가 특정 노드에 배치되는 것을 선호하는 노드를 지정 node affinity : pod를 특정 node에 배치하는것을 선호 pod affinity : pod 간에 같은 노드에 배치하는 것을 선호 pod anti-affinity : pod 간에 다른 ..
Auto Scaling 수동 스케일링 명령어 : $ kubectl scale CONTROLLER --replicas N HPA (Horizontal Pod Autoscaler) 관리되는 모든 pod의 metric (CPU, MEMORY) 정보를 측정해서 가져옴 목표값에 부합하도록 pod의 갯수를 결정 pod의 갯수를 유지 ReplicationController, ReplicaSet, Deployment, StatefulSet 등의 컨트롤러를 스케일링할 수 있다. ### 명령어로 autoscaling ### vagrant@kube-control1:~$ kubectl autoscale CONTROLLER_TYPE CONTROLLER --min N --max N --cpu-percent N vagrant@ku..
Pod의 리소스 관리 ### metrics-server 설치 및 kubectl top nodes 명령어 실행 ### 깃허브 : kubernetes-sigs / metrics-server /releases/latest/download/components.yaml components.yaml 파일에서 137줄에 아래 내용 삽입 (tls 인증을 생략하는 arguments) 137 - --kubelet-insecure-tls kubectl create -f components.ytaml kubectl get pod -n kube-system kubectl top nodes vagrant@kube-control1:~/work/20210907/metrics-server$ kubectl top nodes NAME C..
Deployment Replicaset을 포함하는 상위 컨트롤러로 일정 갯수의 복제본을 유지시켜주는 컨트롤러 배포 전략 (Deployment Strategy) RollingUpdate ReCreate ### deployments 생성때부터 --record 옵션으로 revision 기록 하기 ### vagrant@kube-control1:~/work/20210906$ cat myapp-deploy-v1.yaml apiVersion: apps/v1 kind: Deployment metadata: name: myapp-deploy labels: app: myapp-deploy spec: strategy: type: RollingUpdate rollingUpdate: maxUnavailable: 1 maxSur..
9:38 ### 1. VM 삭제 (vagrant destory) PS C:\Users\hi> cd .\kube\ PS C:\Users\hi\kube> vagrant global-status id name provider state directory ------------------------------------------------------------------------------ e43a286 kube-control1 virtualbox running C:/Users/hi/kube 23a1e45 kube-node1 virtualbox running C:/Users/hi/kube e523be5 kube-node2 virtualbox running C:/Users/hi/kube 47a369d kube..
Deployment ReplicaSet을 포함하는 상위 수준의 컨트롤러 지정된 갯수의 pod 복제본을 생성하고 유지함 배포전략 (Deployment Strategy) 작성방법 spec: strategy: type: STRATEGY_TYPE STRATEGY_TYPE: ~~~ (Kubernetes에서 지원하는) 배포전략 종류 RollingUpdate: 롤링 업데이트 (빠른 롤백이 가능) 기존 애플리케이션 버전에서 새로운 애플리케이션 버전으로 점진적으로 교체하는 배포 전략 maxUnavilable : 롤링 업데이트 중 사용할 수 없는 최대 pod의 수 (기본값: 전체 pod의 25%/정수, 비율 지정가능) maxSurge: 교체과정에서 pod가 설정한 replicas 보다 초과생성되는 최대 pod의 갯수 (기..
9:38 Application Customizing Container image customizing Environment variables Configmap Secret ### 환경변수 이용한 customizing ### vagrant@kube-control1:~/work/20210903$ cat myapp-pod-env.yaml apiVersion: v1 kind: Pod metadata: name: myapp-pod-env spec: containers: - name: myapp image: devops2341/go-myweb:latest env: - name: MESSAGE value: "Customized Message" ports: - containerPort: 8080 protocol: TC..
9:33 review Kubernetes 스토리지 Volume 종류 - emptyDir, gitRepo, hostPath network based storage volume( NFS, iSCSI, Ceph, Cinder, Glusterfs ) - Cloud storage volume ( awsElasticBlockStore, azureDisk, azureFile, gcePersistentDisk 등 ) - PersistentVolume(PV), PersistentVolumeClaim(PVC) Kubernetes Cluster에서 외부 스토리지와의 연결을 담당하는 오브젝트 PV와 PVC는 1:1로 연결될 수 있음 - PersistentVolumeClaim(PVC) 사용자가 pod에 스토리지를 연결하기 위한..