본문 바로가기

ubuntu52

wsl2로 terraform VScode 환경 구축하기 (2) wsl2로 terraform VScode 환경 구축하기 (1) https://btcd.tistory.com/903 1. VScode 설치 1) 아래 링크에서 VScode 다운로드 https://code.visualstudio.com/download Download Visual Studio Code - Mac, Linux, Windows Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. Download Visual Studio Code to experience a redefined code editor, optimized for building and debugging modern we.. 2022. 12. 16.
wsl2로 terraform VScode 환경 구축하기 (1) 1. wsl 설치 (window terminal install) [윈도우] - [Microsoft Store] 에서 Windows Terminal 검색하여 설치 2. wsl2 설치 (window terminal install) 1) Windows PowerShell을 관리자 권한으로 실행 2) PowerShell 에서 아래 명령어를 실행 → ( Linux용 Windows 하위시스템 ) 옵션을 사용 가능하게 만들기 dism.exe /online /enable-feature /featurename:Microsoft-Windows-Subsystem-Linux /all /norestart 3) 아래 명령어를 입력 → (Virtual Manchin 플랫폼) 옵션을 사용 가능하게 만들기 dism.exe /onlin.. 2022. 12. 16.
[k8s] Kube-proxy Kube-proxy란? K8s service의 backend를 구현 Endpoint 연결을 위한 iptables 구성 worker node에서 확인 가능 iptables -t nat -S | grep 80 -A KUBE-MARK-DROP -j MARK --set-xmark 0x8000/0x8000 -A KUBE-SEP-HHZALBXPKUQGKXIS -p tcp -m comment --comment "default/clusterip-service" -m tcp -j DNAT --to-destination 192.168.11.73:80 -A KUBE-SEP-KTW4ECSLTAZBS6DP -p tcp -m comment --comment "default/clusterip-service" -m tcp -j DN.. 2022. 12. 12.
[K8s] Headless Service Headless Service란? ClusterIP가 없는 서비스로 단일 진입점이 필요 없을 때 사용 Service와 연결된 pod의 endpoint로 DNS 레코드가 생성됨 (DNS Resolving Service 지원) Pod의 DNS 주소 : pod-ip-addr.namespace.pod.cluster.local definition apiVersion: v1 kind: Service metadata: name: headless-service spec: type: ClusterIP clusterIP: None #clusterIP를 none으로 설정하면 Headless service selector: app: webui ports: - protocol: TCP port: 80 targetPort: 80.. 2022. 12. 6.
[k8s] ExternalName ExternalName이란? cluster 안에서 외부에 접속 시 사용할 도메인을 등록해서 사용 cluster 도메인이 실제 외부 도메인으로 치환되어 동작 definition apiVersion: v1 kind: Service metadata: name: externalname-svc spec: type: ExternalName externalName: google.com [ Hands - on] ExternalName yaml 파일 생성 및 실행 vi external-name.yaml apiVersion: v1 kind: Service metadata: name: externalname-svc spec: type: ExternalName externalName: google.com kubectl cre.. 2022. 11. 28.
[K8s] LoadBalancer (AKS에서 진행) LoadBalancer란? Public cloud (AWS,Azure, GCP 등)에서 운영 가능 LoadBalancer를 자동으로 구성 요청 NodePort를 예약 후 해당 nodeport로 외부 접근 허용 definition apiVersion: v1 kind: Service metadata: name: loadbalancer-service spec: type: LoadBalancer selector: app: webui ports: - protocol: TCP port: 80 targetPort: 80 [ Hands - on ] LoadBalancer yaml 파일 생성 및 실행 vi loadbalancer-nginx.yaml apiVersion: v1 kind: Service metadata: n.. 2022. 11. 21.
[k8s] NodePort NodePort란? 모든 node를 대상으로 외부 접속 가능한 port를 예약 Default NodePort 범위 : 30000 - 32767 ClusterIP를 생성 후 NodePort를 예약 definition apiVersion: v1 kind: Service metadata: name: nodeport-service spec: type: NodePort clusterIP: 10.100.100.200 # 생략 시 random 생성 selector: app: webui ports: - protocol: TCP port: 80 targetPort: 80 nodePort: 30200 # 생략 시 random 생성 [ Hands - on ] Deployment를 통해서 pod 생성 apiVersion: a.. 2022. 11. 15.
[K8s] Cluster IP ClusterIP란? selector의 label이 동일한 pod들의 그룹으로 묶어 단일 진입점(Virtual IP)을 생성 cluster내부에서만 사용 가능 랜덤하게 loadbalacing을 하지만 균등하게 서비스 될 수 있도록 지원 type 생략 시 default 값으로 10.96.0.0/12 범위에서 할당됨 clusterIP는 IP 중첩을 방지하기 위해 주로 고정시키지 않고 사용함 definition apiVersion: v1 kind: Service metadata: name: clusterip-service spec: type: ClusterIP clusterIP: 10.100.100.100 selector: app: webui ports: - protocol: TCP port: 80 targe.. 2022. 11. 9.