Computer Science
-
k8s deploymentComputer Science/k8s 2023. 3. 4. 20:30
apiVersion: apps/v1 kind: Deployment metadata: name: rest-api-deployment labels: app: rest-api-deployment spec: replicas: 1 selector: matchLabels: server: rest-api-server template: metadata: labels: server: rest-api-server spec: containers: - name: rest-api-kotlin-container image: //img url ports: - containerPort: 80 server: rest-api-server 라는 tag를 가지고 있는 친구들을 1개의 pod로 지속적으로 띄워주는 deployment. 해당 ..
-
aws eks worker node 생성Computer Science/k8s 2023. 3. 4. 20:03
노드 그룹 생성을 통해 eks worker node를 만들어보자. eks의 컴퓨팅에서 노드 그룹을 생성할 수 있다. 그전에 ec2관련 역할을 생성해주어야한다. AmazonEKSWorkerNodePolicy, AmazonEC2ContainerRegistryReadOnly, AmazonEKS_CNI_Policy 이 3가지 권한을 가진 ec2 역할을 생성하고 해당 역할로 eks의 노드그룹을 생성한다. 생성시 주의할 점 2가지. 1. 생성할 subnet이 자동 Ip 부여가 켜져 있는가. 2. kubenetes 레이블을 1개이상 생성하였는가.
-
aws eks kubectl 연동 과정.Computer Science/k8s 2023. 3. 2. 23:01
우선 awscli가 필요하다. brew install awscli https://kubernetes.io/docs/tasks/tools/install-kubectl-macos/ Install and Set Up kubectl on macOS Before you begin You must use a kubectl version that is within one minor version difference of your cluster. For example, a v1.26 client can communicate with v1.25, v1.26, and v1.27 control planes. Using the latest compatible version of kubectl helps avoid kubern..
-
k8s Controller 기본 정리Computer Science/k8s 2023. 2. 12. 23:35
Controller를 삭제한다면 관련 pod들도 삭제됨으로 controller 만 삭제하고 싶다면 --cascade=false 옵션을 넣어서 삭제하면 된다. Replication Controller -> ReplicaSet Template - 띄울 pod의 정보가 담긴 것. pod를 selector가 관리하는데 pod가 죽었을 시 해당 template로 다시 띄운다. Replicas - 띄울 Pod의 개수. Selector(ReplicaSet 부터 추가됨) - matchLabels 는 해당 label만 선택하지만 matchExpressions는 key value값으로 operator를 통해 관리할 수 있다. operator는 크게 4가지가 있는데 Exists, DoesNotExist, In, NotIn이..
-
k8s Object 기본 간략 정리Computer Science/k8s 2023. 2. 12. 20:19
pod - container 들을 모아서 실행하는 곳. 언제든 종료될 수 있으며 재실행 될 때 마다 ip가 변동된다. label을 달 수 있다. (key value) 한 pod에서 같은 port의 container 실행 불가. memory 가 초과 된다면 종료 되지만 Cpu는 초과되도 해당 Limit로 낮추려고 한다. service - 종료되지 않고 고정 ip로써 떠 있어서 pod들을 연결해준다. ClusterIp 방식 - 내부 ip로만 접근할 수 있으며 관리하는 pod들에게 연결해준다. NodePort 방식 - 해당 NodePort로 들어와도 Service로 간다음 Service에서 관리하는 pod들로 연결해준다. 따라서 a node에 접근해도 a node의 들어가고자 하는 pod로 연결되지 않을 수 ..
-
[JavaScript] Jest encountered an unexpected token 해결Computer Science/JavaScript 2023. 1. 16. 21:01
Jest encountered an unexpected token SyntaxError: Cannot use import statement outside a module node js 에서 Test code를 Jest로 작성하던 중 해당 오류를 만났다. import 쪽에서 오류가 발생하였다는데 해결하는데 꽤 시간이 걸렸다. 오류의 근본적인 원인으로는 jest는 현대 문법의 js를 test 하지 못하여서 생긴다. (import 가 불가한 이유 -> Require 사용) https://dev.to/bytebodger/how-i-fixed-the-unexpected-token-error-in-jest-4o1j How I Fixed The Unexpected Token Error In Jest I recentl..
-
Pinpoint를 이용하여 서버 관리하기.Computer Science/Spring boot 2022. 11. 12. 21:35
https://github.com/pinpoint-apm/pinpoint GitHub - pinpoint-apm/pinpoint: APM, (Application Performance Management) tool for large-scale distributed systems. APM, (Application Performance Management) tool for large-scale distributed systems. - GitHub - pinpoint-apm/pinpoint: APM, (Application Performance Management) tool for large-scale distributed sys... github.com Datadog을 사용하다가 pinpoint로 넘어오게 ..
-
AWS 하위 도메인 생성하기.Computer Science/Aws 2022. 11. 10. 02:49
https://aws.amazon.com/ko/premiumsupport/knowledge-center/create-subdomain-route-53/ Route 53을 통해 호스팅되는 도메인에 하위 도메인 생성 Amazon Route 53을 통해 호스팅되는 내 도메인에 하위 도메인을 만들려면 어떻게 해야 합니까? 최종 업데이트 날짜: 2022-10-20 Amazon Route 53을 통해 호스팅되는 내 도메인에 하위 도메인을 만들려면 어 aws.amazon.com 위 링크처럼 하위 도메인을 따로 호스팅 영역으로 생성한뒤, 기존 도메인에 NS로 단순라우팅으로 등록해주어야 한다. DNS가 상위 도메인부터 검색을 해 나아가기 때문에 해당 방식으로 해도 잘 찾아간다. 잘 정리되어 있는 블로그가 있다. http..