본문 바로가기

분류 전체보기

Kubernetes 특정 네임 스페이스의 전체 리소스 조회 kubectl get all을 통해 조회할 수 있지만, 특정 몇 개의 리소스만 조회 된다. - Kubectl get all -n cdi root@c1:~# kubectl get all -n cdi NAME READY STATUS RESTARTS AGE pod/cdi-apiserver-5766fc84f7-dwgjw 1/1 Running 1 6d22h pod/cdi-deployment-555f466b8-4ts68 1/1 Running 230 7d pod/cdi-operator-7d8b795cc5-v9dfd 1/1 Running 2 47h pod/cdi-uploadproxy-74ddfb494f-z75px 1/1 Running 1 7d NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) A..
Kubernetes 노드 추가 방법 1. 토큰 리스트를 확인한 이후 토큰이 없으면 새로 생성해준다. root@v1-1:~# kubeadm token list TOKEN TTL EXPIRES USAGES DESCRIPTION EXTRA GROUPS root@v1-1:~# kubeadm token create 5rcdbn.z7soxtlro0g8d8x2 root@v1-1:~# openssl x509 -pubkey -in /etc/kubernetes/pki/ca.crt | openssl rsa -pubin -outform der 2>/dev/null | openssl dgst -sha256 -hex | sed 's/^.* //' 65ad8d9d9aec097d0d0d6833de19620c4a351c3d2884440046ce79b4dc6fff6d 2..
kubectl init 시 proc-sys-net-bridge-bridge-nf-call-iptables 에러 Init시 가끔 나타나는 에러가 있다. root@v1-1:~# vi /etc/sysctl.conf root@v1-1:~# kubeadm init --config=kubeadm-config.yaml --upload-certs [init] Using Kubernetes version: v1.15.3 [preflight] Running pre-flight checks [WARNING SystemVerification]: this Docker version is not on the list of validated versions: 19.03.2. Latest validated version: 18.09 error execution phase preflight: [preflight] Some fatal error..
Scouter Dockerfile 만들기 Scouter를 컨테이너로 띄워야 하는 일이 있어서 만들게 되었다. - Collector Dockerfile #베이스 이미지는 원하는 걸로 FROM ubuntu:18.04 #Scouter 폴더 옮겨준다. conf는 미리 변경해준다. COPY scouter /scouter #udp, tcp 포트 열어준다. 동일 포트로 사용할 수 있는지 모르겠는데 안전하게 이렇게 했다. EXPOSE 6100 6101 22 RUN sh /scouter/server/startup.sh - Java Agent Dockerfile FROM tomcat:8.5 ENV TOMCAT_HOME /usr/local/tomcat #conf 미리 수정 COPY agent.java $TOMCAT_HOME/scouter/agent.java COP..
chdir to cwd set in config.json failed permission denied 에러 컨테이너 실행 시 루트 유저 이외의 다른 유저로 실행하였을 때 'chdir to cwd set in config.json failed permission denied' 에러가 나타났다. 이 전에 잘 되던 파일이고 chown을 통해 권한 부여도 해주었는데 계속 문제가 생겨서 이틀동안 샤워하면서도 생각하고 밥먹으면서도 생각하고 해결하기 위해 무진장 노력했다. 문제는 소프트링크 때문이었다. 아무 생각없이 Dockerfile안에 소프트링크를 걸어주었는데, 소프트 링크의 경우 권한 변경 시 다음과 같이 변경된다. [root@worker test]# mkdir original [root@worker test]# ln -s original/ copy [root@worker test]# ls -alrt total 0 ..
Kubernetes Network [MeetUp][1st] 오리뎅이의_쿠버네티스_네트워킹 from InfraEngineer 이 분 자료만 있으면 기초 네트워크 SSAB 이해 가능하다. 주기적으로 읽어야 함 리얼.
터미널에서 명령어 timestamp를 찍고 싶을 때 - moreutils 테스트를 진행하다보면 10초, 20초 단위로 옵션을 변경하여 결과를 볼 때가 많다. 이 때 time이나 쉘 스크립트를 이용해서 측정할 수 있겠지만 두 개 이상의 명령어를 수행할 때에는 비교의 어려움이 있다. 그럴 때에는 현재 시간에 기반하여 흐름을 파악하는 것이 편한데 그 때 사용하는 패키지를 소개한다. https://joeyh.name/code/moreutils/ moreutils moreutils is a growing collection of the unix tools that nobody thought to write long ago when unix was young. It began when I blogged: I'm a fan of the unix tools philosophy, but I ..