본문 바로가기

전체 글

[C언어] 입출력함수와 연산자 # 표준입출력함수의 종류키보드 입력 함수scanf(): 모든 자료형 입력getchar(), getch(): 문자형 자료 입력gets(): 문자열 자료 입력화면 출력함수printf(): 모든 자료형 출력putchar(), putch(): 문자형 자료 출력puts(): 문자열 자료 출력# 버퍼를 사용하지 않는 문자 전용 입출력 함수getch(): 문자 전용 입력함수, 입력되는 글자를 화면에서 볼 수 없음putch(): 문자 전용 출력함수// 문자형 자료의 입출력 프로그램(소문자 -> 대문자 변환) #include int main(){ char c; printf("소문자 한 개 입력하시요: \n"); c = getchar(); c=c-32; //소문자를 대문자로 변환 (ASCII.. 더보기
[C] 선행처리기 매크로 # 선행처리기 종류파일 포함 - #include매크로 정의 - #define조건부 컴파일 #include #define program int main()#define print printf#define MAX 100#define MIN 10program{ print("MAX: %d MIN:%d \n", MAX, MIN);}// 매크로 함수 정의 프로그램 #include #define Max(x,y) x>y? x : y#define Min(x,y) x# 매크로 조건문# if defined ~ #endif#ifdef ~ #endif- 매크로 조건문은 반드시 #endif문으로 종료해야 한다.매크로 정의 여부 확인 방법`#if defined 매크로명` //매크로 정의 해제 프로그램 #include #define.. 더보기
[K8S] TS - Worker Node Failure certified-kubernetes-administrator-with-practice-tests 301강참고: https://kubernetes.io/docs/reference/node/node-status/ ⭐Woker Node에는 docker 데몬(runtime)과 kubelet (→ kube-proxy, cni)이 반드시 실행중이어야 한다.이 두개 중 하나라도 실행 중이지 않다면 worker node는 Not Ready 상태가 된다.Cluster info 확인controlplane:~$ kubectl cluster-info Kubernetes control plane is running at https://172.30.1.2:6443CoreDNS is running at https://17.. 더보기
[K8S] TS - Control Plane Failure 📑 Deployment를 통해서 ReplicaSet을 배포시켰는데 제대로 작동을 안하면 or 확장이 되지 않는다면 kube-controller-manager를 먼저 확인해야 한다. 📑 특정 control-plane에 문제가 있으면 /etc/kubernetes/manifest에서 yaml file을 확인해야한다.  certified-kubernetes-administrator-with-practice-tests 298강Node 상태 확인kubectl get podskubectl get nodesControlplane Pods 및 Services 확인$ kubectl get pods -n kube-system$ service kube-apiserver status$ service kube-controll.. 더보기
[K8S] TS - Application Failure 🛠️Pod가 계속 Waiting 상태인 경우 → worker node에 스케줄링은 되었지만 해당 노드에서 실행할 수 없음을 의미한다. (일반적으로 이미지 풀링(pulling)에 실패) 🛠️ Pod는 Running 상태이지만 해야 할 일을 하지 않고 있을 경우→ 명령어 오타 확인# --validate 옵션으로 yaml 확인 가능$ kubectl apply --validate -f mypod.yaml🛠️ Service 디버깅 (svc는 파드 집합에 대한 로드 밸런싱 기능을 제공)→ Service의 Endpoint 존재하는지 확인 (apiserver는 endpoints 리소스를 생성하고 available 상태로 만든다)→ Endpoint 수가 서비스에 속하는 파드 수와 일치하는 지 확인→ Service에.. 더보기
[K8S] Multiple Container 같은 lifecycle 을 공유하는 Multiple container pods.같은 Network, Storage Volume을 공유한다.   # command 이용해서 만들기controlplane ~ ➜ kubectl run yellow --image=busybox --dry-run=client -o yaml > yellow.yaml# yellow.yaml 수정 controlplane ~ ➜ cat yellow.yaml apiVersion: v1kind: Podmetadata: creationTimestamp: null labels: run: yellow name: yellowspec: containers: - image: busybox name: lemon resources.. 더보기
[K8S] Cluster Upgrade Kubernetes Packageskubeadm: 클러스터를 부트스트랩하는 명령kubelet: Pod와 Container 시작과 같은 작업을 수행하는 컴포넌트kubectl: 클러스터와 통신하기 위한 커맨드 라인 유틸리controlplane ~ ➜ k get nodesNAME STATUS ROLES AGE VERSIONcontrolplane Ready control-plane 61m v1.28.0node01 Ready 61m v1.28.0v1.11.3v1: major version11: minor version-- Features, Functionalities (monthly releases)3: patc.. 더보기
[K8S] Logging & Monitoring Logging기본 로그 관리  - kubectl logsPod 내 모든 컨테이너의 로그가 조회 가능하지만 Pod가 삭제되면 해당 로그도 삭제된다.# 특정 컨테이너 로그 조회$ kubectl logs my-pod -c my-container# 모든 컨테이너의 로그 조회$ kubectl logs my-pod --all-contaiers=true# 실시간 log stream 확인 (-f)$ kubectl logs -f my-pod Multiple container의 경우 특정 container name을 명시$ kubectl logs -f $ kubectl get podsNAME READY STATUS RESTARTS AGEwebapp-2 2/2 Running 0 .. 더보기