전체 글
많은 것을 알고 싶고 변화하는 나의 과정을 기록하고, 공유 하는
-
1. The application stores logs at location /log/app.log. View the logs. You can exec in to the container and open the file:> k exec webapp -- cat /log/app.log 2. Configure a volume to store these logs at /var/log/webapp on the host. Use the spec provided below.Name: webappImage Name: kodekloud/event-simulatorVolume HostPath: /var/log/webappVolume Mount: /log > k edit pod webapp> k replcae --for..
KodeKloud - Test Record (section 8)1. The application stores logs at location /log/app.log. View the logs. You can exec in to the container and open the file:> k exec webapp -- cat /log/app.log 2. Configure a volume to store these logs at /var/log/webapp on the host. Use the spec provided below.Name: webappImage Name: kodekloud/event-simulatorVolume HostPath: /var/log/webappVolume Mount: /log > k edit pod webapp> k replcae --for..
2024.07.20 -
Introduction to Docker Stroage : 쿠버네티스 같은 컨테이너 오케스트레이션 도구 저장소를 이해하려면 먼저 저장소가 컨테이너로 어떻게 작동되는지 이해하는게 좋습니다. 먼저 Docker로 저장소가 어떻게 작동하는지 확인해봅시다. Docker의 저장소에 관해서는 2가지 메인 개념이 있습니다.1. Stroage Drivers2. Volume Dirvers Storage in Docker 시스템에 Docker를 설치하면 이 폴더 구조가 /var/lib/docker에 생성됩니다. AUFS 컨테이너라고 불리는 것 아래에 이미지 볼륨 등 여러개의 폴더가 있습니다. 이곳이 docker가 기본값으로 모든 데이터를 저장하는 곳이죠. 여기서 데이터란 Docker 호스트에서 실행되는 이미지 및 컨테이너..
Section 8 : StorageIntroduction to Docker Stroage : 쿠버네티스 같은 컨테이너 오케스트레이션 도구 저장소를 이해하려면 먼저 저장소가 컨테이너로 어떻게 작동되는지 이해하는게 좋습니다. 먼저 Docker로 저장소가 어떻게 작동하는지 확인해봅시다. Docker의 저장소에 관해서는 2가지 메인 개념이 있습니다.1. Stroage Drivers2. Volume Dirvers Storage in Docker 시스템에 Docker를 설치하면 이 폴더 구조가 /var/lib/docker에 생성됩니다. AUFS 컨테이너라고 불리는 것 아래에 이미지 볼륨 등 여러개의 폴더가 있습니다. 이곳이 docker가 기본값으로 모든 데이터를 저장하는 곳이죠. 여기서 데이터란 Docker 호스트에서 실행되는 이미지 및 컨테이너..
2024.07.20 -
1. 아래 명령어를 통해 구성 요소의 정보를 알아낼 수 있음.> cat /etc/kubernetes/manifests/kube-apiserver.yaml 2. What is the Common Name (CN) configured on the ETCD Server certificate?> openssl x509 -in /etc/kubernetes/pki/etcd/server.crt -text 3.How long, from the issued date, is the Kube-API Server Certificate valid for?File: /etc/kubernetes/pki/apiserver.crt> openssl x509 -in /etc/kubernetes/pki/apiserver.crt -text ..
KodeKloud - Test Record (section 7)1. 아래 명령어를 통해 구성 요소의 정보를 알아낼 수 있음.> cat /etc/kubernetes/manifests/kube-apiserver.yaml 2. What is the Common Name (CN) configured on the ETCD Server certificate?> openssl x509 -in /etc/kubernetes/pki/etcd/server.crt -text 3.How long, from the issued date, is the Kube-API Server Certificate valid for?File: /etc/kubernetes/pki/apiserver.crt> openssl x509 -in /etc/kubernetes/pki/apiserver.crt -text ..
2024.07.12 -
클러스터 자체를 형성하는 호스트부터 시작해보자. 이런 호스트에 대한 모든 접근은 보안되어야 하고, 비밀번호 기반의 인증은 사용하지 않게 하며, SSH 키 기반의 인증만 가능하다. kubectl 명령어나 APU에 직접 접근할 때 모든 사용자의 접근은 kube-apiserver 상호작용하며 관리됩니다. 이 모든 요청은 kube-apiserver로 가게 되는데, kube-apiserver는 요청을 처리하기 전에 Authenticate(인증) 합니다. 이것을 통해 kube-apiserver 자체의 접근을 제어하는 것이고, 이때 사용되는 다양한 메커니즘이 있습니다. 1) 누가 클러스터에 접근할 수 있는가? (인증 메커니즘)2) 그것이 무엇을 할 수 있는가? (인가 메커니즘) 클러스터 구성 요소간의 모든 통신은 k..
Section 7 : Security클러스터 자체를 형성하는 호스트부터 시작해보자. 이런 호스트에 대한 모든 접근은 보안되어야 하고, 비밀번호 기반의 인증은 사용하지 않게 하며, SSH 키 기반의 인증만 가능하다. kubectl 명령어나 APU에 직접 접근할 때 모든 사용자의 접근은 kube-apiserver 상호작용하며 관리됩니다. 이 모든 요청은 kube-apiserver로 가게 되는데, kube-apiserver는 요청을 처리하기 전에 Authenticate(인증) 합니다. 이것을 통해 kube-apiserver 자체의 접근을 제어하는 것이고, 이때 사용되는 다양한 메커니즘이 있습니다. 1) 누가 클러스터에 접근할 수 있는가? (인증 메커니즘)2) 그것이 무엇을 할 수 있는가? (인가 메커니즘) 클러스터 구성 요소간의 모든 통신은 k..
2024.07.12 -
1. We need to take node01 out for maintenance. Empty the node of all applications and mark it unschedulable.-> kubectl drain node01 --ignore-daemonsets 2. How many pods are scheduled on node01 now in the default namespace?-> kubectl get pods -o wide 3. How many nodes can host workloads in this cluster? Inspect the applications and taints set on the nodes.-> k describe node | grep Taints 4. vers..
KodeKloud - Test Record (section 6)1. We need to take node01 out for maintenance. Empty the node of all applications and mark it unschedulable.-> kubectl drain node01 --ignore-daemonsets 2. How many pods are scheduled on node01 now in the default namespace?-> kubectl get pods -o wide 3. How many nodes can host workloads in this cluster? Inspect the applications and taints set on the nodes.-> k describe node | grep Taints 4. vers..
2024.07.02 -
1. Operating System Upgrade 만약 여러개의 노드 중 하나가 다운됐다면, 쿠버네티스는 어떤 행동을 할까요?1. 노드가 즉시 다시 시작된다면, kubelet process가 시작되고, pod가 다시 online으로 돌아옵니다.2. 만약 node 다운이 5분 되었다면, 해당 노드에서 pod가 종료됩니다. 쿠버네티스가 죽은 것으로 여기고, pod가 replicaSet으로 생성되었다면, 다른 노드에 다시 생성할 것입니다. pod-eviction-timeout이라고 알려진 controller manager에 놓여진 것은, 기본적으로 5분이라는 디폴트 값을 설정해 놓습니다.다시 말해 노드가 오프라인이 될 때마다 마스터 노드는 최대 5분까지 기다립니다. 만약 pod-eviction-timeo..
Section 6 : Cluster Maintenance1. Operating System Upgrade 만약 여러개의 노드 중 하나가 다운됐다면, 쿠버네티스는 어떤 행동을 할까요?1. 노드가 즉시 다시 시작된다면, kubelet process가 시작되고, pod가 다시 online으로 돌아옵니다.2. 만약 node 다운이 5분 되었다면, 해당 노드에서 pod가 종료됩니다. 쿠버네티스가 죽은 것으로 여기고, pod가 replicaSet으로 생성되었다면, 다른 노드에 다시 생성할 것입니다. pod-eviction-timeout이라고 알려진 controller manager에 놓여진 것은, 기본적으로 5분이라는 디폴트 값을 설정해 놓습니다.다시 말해 노드가 오프라인이 될 때마다 마스터 노드는 최대 5분까지 기다립니다. 만약 pod-eviction-timeo..
2024.07.02 -
1. Rolling Update, Recreate [ 1 ] deployment .yaml 파일을 바꿀 때 set과 edit을 사용할 수 있다. 2. Commands [ 1 ] Create a pod with the given specifications. By default it displays a blue background. Set the given command line arguments to change it to green. > kubectl run webapp-green --image=kodekloud/webapp-color --dry-run=client -o yaml > kubectl run webapp-green --image kodekloud/webapp-color -- --color g..
KodeKloud - Test Record (section 5)1. Rolling Update, Recreate [ 1 ] deployment .yaml 파일을 바꿀 때 set과 edit을 사용할 수 있다. 2. Commands [ 1 ] Create a pod with the given specifications. By default it displays a blue background. Set the given command line arguments to change it to green. > kubectl run webapp-green --image=kodekloud/webapp-color --dry-run=client -o yaml > kubectl run webapp-green --image kodekloud/webapp-color -- --color g..
2024.03.11 -
1. Rollout and Versioning : 처음 배포를 생성하면 새로운 Rollout은 새로운 revision을 생성합니다. 컨테이너 버전이 새것으로 업데이트 되면 새 Rollout이 트리거되고, 새로운 배포 revision을 생성합니다. 배포에 일어난 변화를 추적하고, 전버전으로 돌아갈 수 있게 돕습니다. 배포 전략에는 2가지가 있습니다. 1) 기존의 것을 삭제하고, 새로운 것을 배포하는 방법은 구 버전이 다운되고, 새로운 버전이 업데이트 되기 전 기간에 응용 프로그램이 다운되어 사용자가 사용이 불가합니다. 이 Recreate 전략은 기본적으로 잘 사용되지 않습니다. 2) 한꺼번에 전부 삭제하지 않고, 하나씩 삭제하며 새 버전을 올리는 방법이 있습니다. 이는 응용 프로그램이 다운되지 않고, 업..
Section 5 : Application Lifecycle Management1. Rollout and Versioning : 처음 배포를 생성하면 새로운 Rollout은 새로운 revision을 생성합니다. 컨테이너 버전이 새것으로 업데이트 되면 새 Rollout이 트리거되고, 새로운 배포 revision을 생성합니다. 배포에 일어난 변화를 추적하고, 전버전으로 돌아갈 수 있게 돕습니다. 배포 전략에는 2가지가 있습니다. 1) 기존의 것을 삭제하고, 새로운 것을 배포하는 방법은 구 버전이 다운되고, 새로운 버전이 업데이트 되기 전 기간에 응용 프로그램이 다운되어 사용자가 사용이 불가합니다. 이 Recreate 전략은 기본적으로 잘 사용되지 않습니다. 2) 한꺼번에 전부 삭제하지 않고, 하나씩 삭제하며 새 버전을 올리는 방법이 있습니다. 이는 응용 프로그램이 다운되지 않고, 업..
2024.03.10