Justin의 개발 로그
article thumbnail
네이버클라우드 Cloud Functions으로 Slack 통보 함수 개발
AWS_NCP/NCP 2020. 11. 17. 18:24

#현재 위치 ~/idea/python pip3 install --upgrade pip pip3 install virtualenv virtualenv -p python3 virtualenv source virtualenv/bin/activate pip3 install boto3 # 메인 파이선 소스를 코딩한다. 파일명은 반드시 __main__.py 로 해야 하며, def main(args): 가 정의되어야 함 vi __main__.py import boto3 import json import logging import os from base64 import b64decode from urllib.request import Request, urlopen from urllib.error import URLEr..

Linux Shell 조작 명령어 샘플 모음
IT/Linux_Apache_Nginx 2020. 11. 12. 16:08

문자열 제외 필터 grep -v '제외문자열' #jq(JSON processor)를 이용해 json에서 원하는 값 찾기 # -o : output $ kubectl get nodes -o json | jq -r '.items[].status.addresses[]|select(.type=="InternalIP").address' *#jq 설치 * $ brew install jq # jsonpath에서 원하는 값 찾기 # JSONPath is a query language for JSON # jsonpath 문법 설명 : https://github.com/json-path/JsonPath $ kubectl get nodes -o jsonpath='{.items[].status.addresses[?(@.type..

보호되어 있는 글입니다. 내용을 보시려면 비밀번호를 입력해주세요.
보호되어 있는 글입니다. 내용을 보시려면 비밀번호를 입력해주세요.
보호되어 있는 글입니다. 내용을 보시려면 비밀번호를 입력해주세요.
article thumbnail
Kubernetes 기본 명령어와 replicasets, deploy
Kubernetes 2020. 5. 29. 08:50

https://v1-20.docs.kubernetes.io/ko/docs/reference/kubectl/cheatsheet/ *#쿠버네티스의 리소스 목록 * $kubectl api-resources # 리소스별 yaml 템플릿 필더 설명 $ kubectl explain pods # 리소스 내 필드의 상세 설명 $ kubectl explain pods.metadata # 리소스의 하위 템플릿 모두 보려면 $ kubectl explain pods --recursive KIND: Pod VERSION: v1 DESCRIPTION: Pod is a collection of containers that can run on a host. This resource is created by clients and sc..

Deploy an app
Kubernetes 2020. 5. 27. 09:58

# kubectl create deploy nginx-app --image nginx # watch kubectl get deploy # kubectl get pods NAME READY STATUS RESTARTS AGEnginx-app-b8b875889-27xb9 1/1 Running 0 7m2s # kubectl scale deploy nginx-app --replicas=2 # kubectl get pods NAME READY STATUS RESTARTS AGE nginx-app-b8b875889-27xb9 1/1 Running 0 7m2s nginx-app-b8b875889-89hcz 1/1 Running 0 5s # kubectl delete deployment nginx-app deploym..

Simple service echoserver
Kubernetes 2020. 5. 22. 15:24

#pod 실행 kubectl run echoserver --generator=run-pod/v1 --image="k8s.gcr.io/echoserver:1.10" --port=8080 #서비스 생성 #expose 명령을 통해 외부 접근 방법을 결정 #예제) 포드(po) echoserver를 NodePort 타입의 서비스로 생성 kubectl expose po echoserver --type=NodePort kubectl get pods kubectl get services # 8080 포트를 svc/echoserver의 8080 포트로 포워딩 kubectl port-forward svc/echoserver 8080:8080 #접속 테스트 curl http://localhost:8080 #로그 확인 kub..

Ubuntu Docker: "Error response from daemon: client version 1.40 is too new. Maximum supported API version is 1.39"
Kubernetes 2020. 5. 22. 13:29

Ubuntu에서 Docker API version 오류가 발생하면 아래와 같이 downgrades를 이용해 버전을 맞추면 해결될 가능성 있음 sudo apt-get install -y --allow-downgrades docker-ce-cli=5:19.03.8~3-0~ubuntu-$(lsb_release -cs) kubesplay를 이용해 여러 인스턴스에 쿠버네티스 클러스터를 생성하는 경우, 모든 인스턴스의 docker 버전을 다운그레이드 해야 함

article thumbnail
Spinnaker blue green 배포
IT/Spinnaker 2020. 5. 12. 10:19

Traffic 제어 https://www.spinnaker.io/guides/user/kubernetes-v2/traffic-management/#sample-bluegreen-pipeline Manage Traffic Using Kubernetes Manifests Home / Guides / User / Kubernetes v2 / Manage Traffic Using Kubernetes Manifests This guide shows the basics of how to manage traffic during deployments using the Kubernetes provider. This includes automatically attaching a Service to a workload du..