/images/profile/profile.png

Se Hyeon Kim

Yaml

What is YAML? 시스템 간 데이터를 교화할 때 데이터의 연동과 호환성을 위해 포맷에 대한 규칙이 필요해졌다. 기존에 사용하던 XML은 사용하기 까다롭고 가독성이 매우 떨어지기 떄문에 JSON으로 변경되다가, JSON 역시 주석을 달 수 없는 등 제한이 있고 중괄호/대괄호로 인해 코드 길이가 증가하는 단점이 존재했다. 이런 문제점을 해결하기 위해 YAML이 등장하게 된다. YAML은 XML과 JSON 포맷과 같이 타 시스템 간에 데이터를 주고 받을 때 약속된 포맷이 정의된 파일 형식이라 할 수 있다.

Linux

기본 명령어 정리 명령어 및 기능 설명 ls 현재 디렉토리의 파일 목록 표시 ls -l 상세 파일 목록 표시 ls -al 숨겨진 파일을 포함한 상세 목록 cat 파일 전체 내용 출력 more 파일 내용을 페이지 단위로 출력 less 파일 내용을 스크롤 가능하게 출력 touch 빈 파일 생성 또는 파일 시간 변경 rm 파일 삭제 cp 파일 복사 mv 파일 이동 또는 이름 변경 ln 심볼릭 링크 생성 file 파일 형식 확인 mkdir 디렉토리 생성 rmdir 빈 디렉토리 삭제 cd 디렉토리 변경 cd - 이전 디렉토리로 이동 .

Lab Test

1. Question Use context: k config use-context k8s-c2-AC The cluster admin asked you to find out the following information about etcd runngin on cluster2-controlplane1: Server private key location Server certificate expiration date Is client certificate authentication enabled Write these information into /opt/course/p1/etcd-info.txt Finally you’re asked to save an etcd snapshot at /etc/etcd-snapshot.db on cluster2-controlplane1 and display its status Answer Find out etcd information check the nodes: 1 2 3 4 5 6 7 k get nodes NAME STATUS ROLES AGE VERSION cluster2-controlplane1 Ready control-plane 89m v1.

Mock Test 3

1. Question Create a new ServiceAccount with the name pvviewer. Grant this ServiceAccount access to list all PersistentVolumes in the cluster by creating an appropriate ClusterRole called pvviewer-role and ClusterRoleBinding called pvviewer-role-binding. Next, create a pod called pvviewer with the image: redis and serviceAccount: pvviewer in the default namespace. Answer Pods authenticate to the API Server using ServiceAccounts. If the serviceAccount name is not specified, the default service account for the namespace is used during a pod creation.

Mock Test 2

1. Question Take a backup of the etcd cluster and save it to /opt/etcd-backup.db. Answer 1 2 3 export ETCDCTL_API=3 etcdctl snapshot save --cacert=/etc/kubernetes/pki/etcd/ca.crt --cert=/etc/kubernetes/pki/etcd/server.crt --key=/etc/kubernetes/pki/etcd/server.key /opt/etcd-backup.db 2. Question Create a Pod called redis-storage with image: redis:alpine with a Volume of type emptyDir that lasts for the life of the Pod. Pod named ‘redis-storage’ created Pod ‘redis-storage’ uses Volume type of emptyDir Pod ‘redis-storage’ uses volumeMount with mountPath = /data/redis