분류 전체보기 344

[바닐라 JS로 크롬 앱 만들기] LOGIN

미루고 미뤄왔던 모멘텀 .. 죽지 않고 돌아와 버렸다 ! ● Index.html ● App.js const loginInput = document.querySelector("#login-form input"); const loginForm = document.querySelector("#login-form") const greeting = document.querySelector("#greeting"); const HIDDEN_CLASSNAME = "hidden"; const USERNAME_KEY = "username"; # Login Submit Button 클릭 시 작동 함수 function onLoginSubmit(event) { event.preventDefault();# 브라우저의 기본 동작 ..

ETC 2023.05.02

[Kubernetes] Namespace

어 ? 쿠버네티스 대시보드에 네임스페이스 한 번 만들러 갈래 ? 그래 따라와 ~ (1) Namespace 설정 방법 # Namespace 생성 apiVersion: v1 kind: Namespace metadata: name: nm-1 # Pod 생성 apiVersion: v1 kind: Pod metadata: name: pod-1 namespace: nm-1# Namespace 지정 spec: containers: - name: container image: ubuntu:latest command: ["/bin/sh", "-ec", "while :; do echo '.'; sleep 5 ; done"] (2) ResourceQuota ▷ 네임스페이스별 총 리소스 사용을 제한하는 제약 조건 제공 : 오..

[Kubernetes] MSA 실습하기 - Admin & Main MSA

[ 이미지 준비 ] ● 이미지 만들기 https://github.com/scalablescripts/python-microservices GitHub - scalablescripts/python-microservices Contribute to scalablescripts/python-microservices development by creating an account on GitHub. github.com # git 설치 dnf -y install git # git repository 다운로드 git clone https://github.com/scalablescripts/python-microservices # 방화벽 실행 systemctl start firewalld # 이미지 빌드 docker ..

[Kubernetes] AutoScaling (HPA)

[ 기본 설정 추가 ] ● Metrics Server 설치 kubectl apply -f https://github.com/kubernetes-sigs/metrics-server/releases/download/v0.6.3/components.yaml ● Kubernetes Dashboard 의 네임스페이스 : kube-system 설정 변경 》 kube-system 네임스페이스에 추가된 metrics-server 디플로이먼트 설정 변경 args: - '--cert-dir=/tmp' - '--secure-port=443' - '--kubelet-preferred-address-types=InternalIP,ExternalIP,Hostname' - '--kubelet-use-node-status-port'..

[Kubernetes] Controller - Deployment (Recreate / RollingUpdate / BlueGreen)

- ReplicaSet 을 컨트롤 - 기본 방식 : RollingUpdate ● Deployment 》 Recreate 방식 # Recreate 방식 apiVersion: apps/v1 kind: Deployment# deployment 선언 metadata: name: deployment-1# deployment 이름 spec: replicas: 2# 생성할 replicaset 개수 strategy: type: Recreate revisionHistoryLimit: 1# 기억할 업데이트 개수 (이전 버전으로 돌아갈 수 있음) selector: matchLabels: type: app template: metadata: labels: type: app spec: containe..

[Kubernetes] Controller - ReplicaSet

- Pod 를 컨트롤 - Labels 를 통해 연결 - matchLabels: 쓰여진 모든 라벨을 가지고 있어야 연결 - matchExpressions: 조건부 라벨 selector: matchLabels: type: web ver: v1 matchExpressions: - {key: type, operator: In, values: [web]}# type 라벨 이름에 web 이 들어가면 - {key: ver, operator: Exists}# ver 라벨이 존재하기만 하면 ● Pod apiVersion: v1 kind: Pod metadata: name: hello-replica spec: containers: - name: hello image: nuy0307/hello:8..

[Kubernetes] Service - 롤링 업데이트

2023.04.25 - [분류 전체보기] - [Kubernetes] Service - LoadBalancer : Django-Apache 연동 이미지 파드 생성하기 [Kubernetes] Service - LoadBalancer : Django-Apache 연동 이미지 파드 생성하기 ♡ 순서 ♡ 1. 이미지 만들기 2. K8S Dashboard 에서 Django-Apache&MySQL : Pod / ConfigMap / Service 생성 3. Service - LoadBalancer 생성 ● 기본 설정 2023.04.25 - [분류 전체보기] - [Kubernetes] Service - LoadBalancer [Kubernetes] Se alsrudalsrudalsrud.tistory.com 이 파드를..

[Kubernetes] Service - LoadBalancer : Django-Apache 연동 이미지 파드 생성하기

♡ 순서 ♡ 1. 이미지 만들기 2. K8S Dashboard 에서 Django-Apache&MySQL : Pod / ConfigMap / Service 생성 3. Service - LoadBalancer 생성 ● 기본 설정 2023.04.25 - [분류 전체보기] - [Kubernetes] Service - LoadBalancer [Kubernetes] Service - LoadBalancer ♡ 순서 ♡ 1. 온프레미스 환경에서 로드밸런서 사용하기 2. 로드밸런서 타입의 서비스 생성해보기 (nginx) [ 온프레미스 환경에서 로드밸런서 사용 설정 ] 참고 : https://mlops-for-all.github.io/docs/appendix alsrudalsrudalsrud.tistory.com [ L..

[Kubernetes] Service - LoadBalancer

♡ 순서 ♡ 1. 온프레미스 환경에서 로드밸런서 사용하기 2. 로드밸런서 타입의 서비스 생성해보기 (nginx) [ 온프레미스 환경에서 로드밸런서 사용 설정 ] 참고 : https://mlops-for-all.github.io/docs/appendix/metallb/ 2. bare-metal 클러스터용 load balancer metallb 설치 MetalLB란? # Kubernetes 사용 시 AWS, GCP, Azure 와 같은 클라우드 플랫폼에서는 자체적으로 로드 벨런서(Load Balancer)를 제공해 주지만, 온프레미스 클러스터에서는 로드 벨런싱 기능을 제공하는 모듈을 mlops-for-all.github.io ● ARP 모드 확인 kubectl get configmap kube-proxy -..

728x90