본문 바로가기

분류 전체보기

(220)
[Python]Pandas 라이브러리란? pandas 라이브러리란? 테이블형 데이터를 다룰 수 있는 다양한 기능을 가진 라이브러리 데이터를 다루기 위해 데이터 프레임(Dataframe)과 시리즈(Series) 제공 시리즈(Series)는 1차원 데이터를 다룬다. (컬럼이 하나밖에 없다) 데이터프레임(Dataframe)이 테이블형(2차원) 데이터를 다룬다. (행,렬이 같이 존재) 데이터 분석/머신 러닝에서 데이터 처리를 위해 사용 pandas 데이터 타입 pandas의 데이터 타입은 파이썬과 다르다 [pandas] → [python] object → str int64 → int float64 → float bool → bool datetime64 → 날짜/시간 timedelta → 두 datatime64 간의 차이 데이터 타입 변경 - Serie..
[Kubernetes]What is RBAC in Kubernetes? (Role based access control) Purpose When lots of users use a cluster, we can seperate access rights with namespace or API. 클러스터 하나를 여러 명이 사용할 때는 API나 네임스페이스별로 권한을 구분해서 권한이 있는곳에만 접근하도록 만들 수 있다. Kubernetes API Access Control type ABAC(Attribute-based access control) access control paradigm whereby access rights are granted to users through the use of policies which combine attributes together. RBAC(Role-based access control)..
[Kubernetes]Use TLS certificates as secret in Kubernetes Purpose Create TLS secret for HTTPS use 기존에 떠 있는 ingress에 같은 이름으로 인증서 시크릿 교체시 ingress 나 pod 재시작 없이 인증서 적용 가능하다. Generate openssl Cert for testing HTTPS 인증서를 저장하는 용도로 시크릿을 사용할 수 있다. [dewble@instance-1 secret]$ openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt -subj "/CN=example.com" Generating a 2048 bit RSA private key ..........................................+++ ..
[Harbor]Install harbor with helm chart in Kubernetes Purpose Install harbor to manage container images Harbor? CNCF 재단의 graduated된 오픈소스 프로젝트 Container image나 Helm chart를 저장할 수 있는 저장소이다. 이미지 보관 주기, 이미지 스캐닝, RBAC 등 다양한 기능을 제공한다. Download helm chart Helm chart 사용 방벙 2022.05.24 - [Container/Kubernetes] - [Kubernetes]Understand how to use helm chart in Kubernetes add repo helm repo add harbor https://helm.goharbor.io helm repo list fetch & unzip chart..
[Kubernetes]Kubernetes ETCD backup and restore Check ETCD information check ETCD version kubectl describe pod etcd-controlplane -n kube-system At what address do you reach the ETCD cluster from you master node? check listen urls(endpoint) kubectl describe pod etcd-controlplane -n kube-system ## 중략 --listen-client-urls=https://127.0.0.1:2379,https://172.17.0.62:2379 ETCD server certificate file located find server cert kubectl describe pod et..
[Kubernetes]Check cluster IPs range in Kubernetes Purpose Check cluster IPs range Services IP range kubectl cluster-info dump | grep -m 1 service-cluster-ip-range "--service-cluster-ip-range=10.96.0.0/12", Pods IP range kubectl cluster-info dump | grep -m 1 cluster-cidr "--cluster-cidr=10.254.0.0/16",
[Python]정규표현식 사용법 2022.05.16 - [Python] - [Python]정규표현식 라이브러리 사용법과 예제 정규표현식이란? 특정한 규칙을 가진 문자열의 집합을 표현하는 데 사용하는 형식 자주 쓰이는 표현 숫자를 찾음: [0-9] 숫자가 아닌것을 찾음: [^0-9] white space 문자를 찾음: [\t\n\r\f\v] white space 아닌 문자를 찾음: [^\t\n\r\f\v] 문자, 숫자를 찾음: [0-9a-zA-Z] 문자, 숫자 아닌것을 찾음: [^0-9a-zA-Z] 한글을 찾음: [가-힣] 한글 아니 것을 찾음: [^가-힣] Dot(.) Dot \. 메타 문자는 줄바꿈 문자인 \n를 제외한 모든 문자(한 개)를 의미함 예: D.A 는 D + 모든 문자(한 개) + A 를 의미 DAA, DvA, D1A, ..
[Python]정규표현식 라이브러리 사용법과 예제 2022.05.16 - [Python] - [Python]정규표현식 사용법 정규표현식 라이브러리 임포트 import re 함수 match : 문자열 처음부터 정규식과 매칭되는 패턴을 찾아서 리턴 (1개) search : 문자열 전체를 검색해서 정규식과 매칭되는 패턴을 찾아서 리턴 (1개) findall : findall 함수: 정규표현식과 매칭되는 모든 문자열을 리스트 객체로 리턴함 split : 찾은 정규표현식 패턴 문자열을 기준으로 문자열을 분리 sub : 찾은 정규표현식 패턴 문자열을 다른 문자열로 변경 사용법 정규 표현식 패턴 만들기 pattern = re.compile('D.A') 패턴에 매칭되는지 확인하기 pattern.search("D*A") Example - match, search, fi..