본문 바로가기

Cloud/Kubernetes

Evicted난 Pod 한번에 지우기 kubectl get pods -A | grep Evicted | awk '{print $1" "$2}' | xargs kubectl delete pods -n
ceph 상태가 Long heartbeat ping time ~ 일 때 갑자기 잘 되던 ceph가 안된다고 연락을 받았다. ceph 상태를 보니 다음과 같았다. [root@rook-ceph-tools /]# ceph -s cluster: id: - health: HEALTH_WARN Long heartbeat ping times on back interface seen, longest is 1394.570 msec Long heartbeat ping times on front interface seen, longest is 1395.070 msec services: mon: 1 daemons, quorum a (age 12m) mgr: a(active, since 45s) mds: myfs:1 {0=myfs-b=up:active} 1 up:standby-replay osd:..
Tomcat 로그 EFK로 수집해보기 - 전제조건 : EFK는 이미 Kubernetes Cluster에 배포되어 있는 상태 쿠버네티스 로깅 아키텍처는 여러가지가 있는데 그 중 sidecar 방식을 택했다. 자꾸 키바나를 키아나라고 부르는 내 처지가 가슴이 웅장해진다... 적당히 정리하는 쪽으로 가겠다. EFK는 Elasticsearch + Fluted + Kibana 3개를 뜻한다. 예전인 ELK가 근본이였는데 Kube 환경과 CNCF 재단덕에 Fluted가 더 많이 쓰인다. Fluted가 로그를 elasticsearch로 보내고 수집된 로그들은 kibana를 통해 시각화 된다. 나는 tomcat 로그를 수집해보기로 했다. docker pull tomcat 톰캣 이미지를 끌어오고, 디플로이먼트를 만들어줬다. 파드로 만들어도 되긴 하는데 관리..
Kubernetes Trouble Shooting 정리하기 위해 참고 할 링크 회사 클라우드 제품이 몇 군데 사이트에서 운영 중이고, 앞으로 들어가는 사이트들에서도 트러블슈팅 정리가 어느정도 필요하다고 하여 다음주에 정리할 겸 참고할 링크를 먼저 작성한다. 1. 네트워크 이슈 - 개념을 짚고 넘어가야 함 : calico, istio, iptables - CNI : https://www.youtube.com/watch?v=YjjrQiJOyME&feature=youtu.be - Docker Overlay Network : https://docs.docker.com/network/overlay/ - network issue (그림만 참고) : https://blog.appoptics.com/how-to-troubleshoot-kubernetes-network-issues/ - gener..
kubectl help를 치면 나오는 명령어들 Basic Commands (Beginner): create Create a resource from a file or from stdin. expose Take a replication controller, service, deployment or pod and expose it as a new Kubernetes Service run Run a particular image on the cluster set Set specific features on objects Basic Commands (Intermediate): explain Documentation of resources get Display one or many resources edit Edit a resource on the serve..
Tekton Pipelines Tutorial https://github.com/tektoncd/pipeline/blob/master/docs/tutorial.md tektoncd/pipeline A K8s-native Pipeline resource. Contribute to tektoncd/pipeline development by creating an account on GitHub. github.com Tekton Pipeline은 Kubernetes 환경에서 CI/CD를 제공한다. 튜토리얼을 통해서 이해하고 넘어가려고 한다. Tekton Pipeline은설치 시 아래 엔티티를 정의한다. (설명은 내 마음대로다) 엔티티 설명 Task 하나의 단계 (단위는 컨테이너) TaskRun 매개변수를 사용하여 Task를 실행 (파이프라인 런을 통해서도 ..
Ceph Repair 해보기 테스트 도중 ceph의 동작이 이상해서 상태를 확인해보았다. HEALTH_ERR로 떠있고 에러 상태였는데, repair 하는 방법을 찾아 작성해본다. root@c2:~# k exec -it -n rook-ceph rook-ceph-tools-776f7b4dbd-zlzjr -- ceph -s cluster: id: 1f5b2a70-e56d-4feb-8def-4e9aeff2f58b health: HEALTH_ERR 506 scrub errors Possible data damage: 4 pgs inconsistent 1/3 mons down, quorum b,e services: mon: 3 daemons, quorum b,e (age 13m), out of quorum: d mgr: a(active, si..