Argocd-github 연결 사전 준비 GitHub 계정 1. GIthub에 yaml 업로드 - 개인 github에 nginx.yaml을 업로드 한다 1) Add file -> Upload Files 2) choose your files 3) nginx.yaml 업로드 4) upload 확인 2. argocd 설정 - NEW APP 설정 1) Create application 2) 설정 Application Name: test Project name: default Sync Option: Auto-create namespace Repogitory URL: https://github.com/kh-guard/CICD.git PATH: . Cluster URL: 클릭하면 나옵니다 namespace: nginx 3) 생성 4) sync 5.. Kubernetes/Kubernetes 사용법 2년 전
harbor 설치 (docker-compose) 지난 harbor 설치는 k8s에 helm으로 설치 하는 방법이였으나, 이번엔 docker-compose를 사용하여 작성하였다 docker-compose 란? 여러 개의 컨테이너로부터 이루어진 서비스를 구축, 실행하는 순서를 자동으로 하여, 관리를 간단히하는 기능 1. harbor 설치 1) docker 설치 # yum install -y yum-utils # yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo - >도커 repo등록 # yum install docker-ce docker-ce-cli containerd.io -> 도커 설치 # systemctl start docker && systemc.. Kubernetes/Kuberenetes 설치 2년 전
Jenkins 설치 (yaml) jenkins란? 젠킨스는 Open Source CI (Continuous Integration) 툴 1. jenkins 설치 1) namespace 생성 # kubectl create namespace jenkins 2) jenkins yaml 작성 # vi jenkins-deploy.yaml (service type은 NodePort로 우선 진행) apiVersion: apps/v1 kind: Deployment metadata: name: jenkins-leader namespace: jenkins spec: replicas: 1 selector: matchLabels: app: jenkins-leader template: metadata: labels: app: jenkins-leader spec.. Kubernetes/Kuberenetes 설치 2년 전
Harbor 설치 (helm) harbor란? 오픈소스 컨테이너 레지스트리 (이미지 저장소) 1. harbor 설치 1) helm repo add (둘중 하나만 하면 된다. 글쓴이는 아래 bitnami를 사용했다) # helm repo add harbor https://helm.goharbor.io # helm repo add bitnami https://charts.bitnami.com/bitnami 2) helm values 추출 및 수정 (default 설치도 되지만 내 정보를 입력하기 위해 values를 받는다) # helm inspect values harbor/harbor > values.yaml # vi values.yaml (입력 위치 간단히 작성) global.storageClass: "nfs-client" admin.. Kubernetes/Kuberenetes 설치 2년 전
Istio 모니터링 (feat. nginx) 1. nginx 설치 1) nginx yaml 입력 # vi nginx.yaml apiVersion: apps/v1 kind: Deployment metadata: name: nginx-deployment labels: app: nginx spec: replicas: 3 selector: matchLabels: app: nginx template: metadata: labels: app: nginx spec: containers: - name: nginx image: nginx:1.14.2 ports: - containerPort: 80 2) nginx ns 생성 # kubectl create namespace nginx 3) Istio injection 설정 및 확인 # kubectl label nam.. Kubernetes/Kubernetes 사용법 2년 전
Istio 설치 Istio란? Istio는 마이크로서비스 간 데이터 공유를 제어하는 기반을 제공하는 오픈소스 서비스 메쉬 플랫폼 1. Istio 설치 1) istioctl 설치 # curl -L https://istio.io/downloadIstio | sh - # istio 폴더 다운로드 # cd istio-1.16.0 # 경로 이동 # export PATH=$PWD/bin:$PATH # istioctl 을 사용하기 위해 PATH등록 # istioctl install --set profile=demo -y # istio pkg 설치 2) istio 설치 확인 # kubectl get pod -n istio-system 2. sample project 확인 1) book-info 설치 # kubectl label nam.. Kubernetes/Kuberenetes 설치 2년 전
Ingress 에 cert-manager 연결 Cert-manager란? Cert-manager는 Kubernetes 내부에서 HTTPS 통신을 위한 인증서를 생성하고, 또 인증서의 만료 기간이 되면 자동으로 인증서를 갱신해주는 역할을 하는 Certificate manager controller입니다. 1. Cert-manager 설치 1) cert-manager deploy # kubectl apply -f https://github.com/cert-manager/cert-manager/releases/download/v1.9.1/cert-manager.yaml * helm으로 설치시 # helm repo add jetstack https://charts.jetstack.io # helm repo update # helm install cert-m.. Kubernetes/Kubernetes 사용법 2년 전
Ingress 설치 Ingress 란? 클러스터 외부에서 내부 서비스로 들어오는 네트워크(트래픽)를 어떻게 처리할지 정리해둔 규칙 모음 1. Ingress 설치 1) Nginx Ingress deploy # kubectl apply -f https://raw.githubusercontent.com/kubernetes/ingress-nginx/controller-v1.1.3/deploy/static/provider/cloud/deploy.yaml 2) 설치 확인 3) Ingress Service 확인 2. Ingress 적용 하기 (이전에 설치한 prometheus에 연결) 1) prometheus 서비스 확인 2) ingress yaml template # vi monitoring-ingress.yaml ingress ya.. Kubernetes/Kuberenetes 설치 2년 전
Monitoring 구축 (prometheus, grafana) prometheus란? Prometheus는 오픈소스 시스템 모니터링 및 경고 툴킷이다. grafana란? Grafana는 데이터를 시각화 하는데 가장 최적화된 대시보드를 제공해주는 오픈소스이다. 1. Prometheus 설치 1) helm repo add # helm repo add prometheus-community https://prometheus-community.github.io/helm-charts 2) helm values.yaml 수정 (이전 nfs-client-provisinor 을 사용하여 pvc를 생성하려 함) # helm inspect values prometheus-community/prometheus > values.yaml # sed -i 's/# storageClass: ".. Kubernetes/Kuberenetes 설치 2년 전
NFS-Client-Provisioner 설치 NFS-Client-Provisioner 란? k8s에서 PVC를 연결 할 PV 생성을 별도로 해야 하는데 NFS Client Provisioner 을 사용하여 PVC가 자동으로 PV에 바인딩 되도록 설정 1. NFS 서버 만들기 (NFS 서버의 IP는 172.30.3.251 로 설정 - 별도의 vm) 1) NFS pkg 설치 # yum -y install nfs-utils 2) 저장할 디렉토리와 권한 부여 # mkdir /nfs # vi /etc/exports /nfs *(rw, no_root_squash) 3) NFS 적용 # exportfs -r 4) NFS 가동 # systemctl start nfs-server && systemctl enable nfs-server # systemctl star.. Kubernetes/Kuberenetes 설치 2년 전