공부하고 기록하는, 경제학과 출신 개발자의 노트

학습일지 199

Knative Series 4 - Eventing Deep Dive

Knative Eventing Deep Dive https://youtu.be/XEkctUsVl5I 강연자: Ahmed Abdalla Redhat Openshift serverless team 소속. knative eventing 담당 cf. 이 강의를 끝까지 들어보면, github 소스코드를 따로 보여주지 않는다. 강의에서 사용한 github 레포도 따라가보고 강연자 @devguyio 의 깃허브 링크를 확인했지만, 이 실습에 사용한 yaml코드는 없었다. Knative Eventing이란 무엇인가. 뜯어보려면 꽤 복잡한 구조. 미리 정의하고 출발하자면 Opinionated way of building Event Driven Architeucture / Event Driven Application usi..

Knative로 배포한 애플리케이션의 동작과정

외부의 요청이 External Load balancer로 들어온다. 해당 요청은 Ingress Gateway (Istio)로 포워딩된다. istio gateway의 목적은 'destination Service'로 요청을 전달하는 것. k8s에서 애플리케이션을 실행하려면 몇 가지 리소스가 필요하다. Deployment -> it creates a ReplicaSet that creates pods. Horizontal Pod Scaler -> ensure the correct number of Replicas is running. Service -> other pod에서 Access하기 위한 통로. Ingress Gateway to Service -> 클러스터 외부에서 접근하기 위한 경로. kn servi..

Google Cloud Run으로 Container image 실행하기

Managed Container-as-a-Service Serverless Deployment remove the needs for us to manage the underlying infraStructure. Simplified Application Management. Out-of-the-box High availability & Scaling "Pay what your Users use" business Model. 서비스를 제공하는 vendor 입장에서는 'do not waste resources like cpu / ram for no reason.' 즉 '내가 사용하는 리소스'에 대한 비용 지출이 아니라, '내 프로덕트를 이용하는 사용자가 쓰는 리소스'에 대한 비용 지출이 이루어진다. inste..

Knative Series 2 - Knative 101

강연자 : Carlos. ibm cloud의 cloud native Architect로 재직중 Modernizing Customers' Application into K8s (Openshift) Serverless 쪽 오픈소스 프로젝트 Contributor (OpenWhisk, Knative) Knative에서 제공하는 두 개의 component -> Serving, Eventing. 각각 독립된 컴포넌트로 사용이 가능하다. Serving -> Scaling to Zero, traffic splitting 일반적으로 kubernetes를 사용해서 scaling 기능을 적용하려면 ingress : yaml 세팅법, https를 위한 TLS 적용을 secret으로 등록하기, Endpoint를 service에..

KubeCon2020 - Build your own Envoy Control Plane

Build your own Envoy Control Planehttps://youtu.be/qAuq4cKEG_E?si=6oAnvvc2i3qgpfhQ  Steve Sloka. VMwarecontour의 maintainerWhat is Envoy? Envoy: cloud-native application을 위한 edge / service proxy 오픈소스 프로덕트. Envoy 용어 정리upstream: any request that's in Envoy, and it Routes somewhere to certain endpoint.downstream: any request that comes to EnvoyListener: Named Network Location (port, unix domain sock..

간단하게 GORM 다루어보기

https://www.youtube.com/watch?v=9koLNdEcSR0 위 영상에서 다룬 내용들을 정리했음. 2020년 8월 기준 영상이라, 영상 이후 변경 혹은 수정된 방식의 GORM 사용법으로 업데이트했다. GORM Code-first ORM. go code로 Create DB Schema, interact with DB with Writing SQL Query 등을 가능하게 함. https://gorm.io/docs/models.html package main import ( "fmt" "log" "gorm.io/gorm" "gorm.io/driver/sqlite" ) /* 테이블 정의하기 - gorm.Model을 struct의 정의부에 추가한다. - primary Key인 ID, creat..

삼성SDS Techtonic 2021 - MSA Reference Platform

발표자: 삼성SDS DT아키텍처그룹 임지훈 프로. Cloud Native 환경으로 서비스를 개발하거나, 클라우드 환경으로 서비스를 이전하려고 할 때삼성SDS에서 개발해 제시하는 전체적인 프로세스 / 아키텍처를 설명해주었던 강연.MSA Reference Platform  Monolitic'모듈' 이라는 구성요소. 실행 시 프로세스에 Link되는 구조.모듈 간 결합도가 높은 편이며, Centralized된 DB에 모든 데이터 저장 / 수정.일정 규모 이상이 되면 구조를 바꾸거나 변화를 만들어내기 쉽지 않다.MicroService'서비스' 라는 단위로 구성되어 있으며, 각 서비스는 API로 통신.각각의 서비스는 독립적으로 배포 가능한 단위를 의미함Loosely Coupled.Cloud Native Applic..

Kubernetes Deep Dive - (8). Storage

Storage Container File System ephemeral. 컨테이너를 삭제하거나 재실행하면 컨테이너 file system의 데이터도 같이 삭제됨. 컨테이너가 계속 사용해야 하는 데이터라면 Volumes를 사용하는 편이 좋다. Volumes Runtime에는 컨테이너가 접근 가능한 outside-container storage. real time change - 컨테이너가 참조하고 있는 파일 값이 변경될 경우 external storage의 값도 같이 바뀐다. Persistent Volumes 보다 추상화된 형태. k8s object처럼 Persistent Volumes를 생성해서 pod이 사용할 수 있게 한다. runtime 때, 컨테이너는 storage에 직접 접근하는 대신 Persist..

Kubernetes Deep Dive - (7). Service

Service 외부에서 사용자가 Application Pod에 접근할 수 있도록 하는 k8s Object. 클라이언트의 요청을 받고 pod에게 로드밸런싱으로 트래픽을 전달하는 역할도 겸한다. 실제로 사용자 (클라이언트)가 사용하게 될 ip주소와 Port가 Endpoint. Service Types Service에는 여러 타입이 있고, 각 타입마다 애플리케이션을 어떻게 / 어디로 expose 시킬 것인지의 Rule이 조금씩 다름. Service Type의 디폴트는 ClusterIP. CKA에는 LoadBalancer와 ExternalName도 범위에 들어간다고 함 ClusterIP 클러스터 내에서 Pod끼리 통신하고자 할 때 사용. 클러스터 외부 노출이 아니라 클러스터 내부에서의 노출임. 즉 Same cl..

Kubernetes Deep Dive - (6). Network

K8s Network pod끼리 통신은 어떻게 할 것인가? 에 관련된 문제들. Network Implementation으로 여러 종류가 있지만, kubeadm을 사용한다면 Calico가 가장 적절함. 기본적인 규칙 모든 pod는 Network Address Translation (NAT) 없이 다른 Pod과 통신이 가능해야 한다. (어느 node에서 동작하건 상관없이) IP / DNS 또는 localhost로 접근이 가능해야 함 같은 Single Cluster 내부에 있다면, 어느 노드에 있는 pod이라 해도 IP주소나 local DNS로 서로 통신이 가능하다. CNI Plugins k8s의 Network Implementation을 제공하는 여러 plugin 중 하나. k8s 공식문서에서 cluster..