클라우드/CKA

    [CKA] 네트워크 & 리눅스 명령어

    ip 네트워크 eth0의 상태 확인 ip link show eth0 default gateway를 얻는 방법 ip route show default What is the port the kube-scheduler is listening on in the controlplane node? netstat -tnlp Notice that ETCD is listening on two ports. Which of these have more client connections established? root@controlplane:~# netstat -anp | grep etcd | grep 2380 | wc -l 1 root@controlplane:~# netstat -anp | grep etcd | grep 2..

    [CKA] Advanced kubectl commands

    문제01 Get the list of nodes in JSON format and store it in a file at /opt/outputs/nodes.json. [나의 풀이] kubectl get nodes -o json > /opt/outputs/nodes.json 문제02 Get the details of the node node01 in json format and store it in the file /opt/outputs/node01.json. [나의 풀이] kubectl get nodes node01 -o json > /opt/outputs/node01.json 문제03 Use JSON PATH query to fetch node names and store them in /opt/out..

    [CKA] Ligtning Lab

    문제01 Upgrade the current version of kubernetes from 1.19 to 1.20.0 exactly using the kubeadm utility. Make sure that the upgrade is carried out one node at a time starting with the master node. To minimize downtime, the deployment gold-nginx should be rescheduled on an alternate node before upgrading each node. Upgrade controlplane node first and drain node node01 before upgrading it. Pods for g..

    [CKA] mock exam 03

    문제01 Create a new service account with the name pvviewer. Grant this Service account access to list all PersistentVolumes in the cluster by creating an appropriate cluster role 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. ServiceAccount: pvviewer ClusterRol..

    [CKA] mock exam 02

    문제1 Take a backup of the etcd cluster and save it to /opt/etcd-backup.db. [나의 풀이] etcdctl --help #etcdctl이 설치되어있지 않다면 설치 sudo apt update sudo apt install etcd-client # 환경변수 설정 export ETCDCTL_API=3 # etcd 백업 진행 etcdctl --cacert=옵션값 \ --cert=옵션값 \ --key=옵션값 \ snapshot save 백업파일경로 및 파일명 # 3가지 옵션값 위치 찾는 법 ps -aux | grep -i etcd etcdctl --cacert=/etc/kubernetes/pli/etcd/ca.cert \ --cert=/etc/kubernet..

    [CKA] mock exam 01

    [문제] Create a service messaging-service to expose the messaging application within the cluster on port 6379. Use imperative commands. Service: messaging-service Port: 6379 Type: ClusterIp Use the right labels [나의 풀이] root@controlplane:~# kubectl create service clusterip messaging-service --tcp=6379 service/messaging-service created [정답] kubectl expose pod messaging --port=6379 --name messaging-s..

    [network] dns

    /etc/resolv.conf 해당 호스트에서 인터넷상의 도메인을 찾아갈 때 도메인 주소로 질의하면 IP로 변환해주는 dns 서버를 지정해주는 설정 파일 먼저 /etc/hosts 에서 해당 도메인의 ip를 확인하고 없는 경우 resolv.conf에 지정된 dns 서버에 도메인 네임을 물어본다. DNS record DNS에 받은 요청을 어떻게 처리할 것인지에 대한 정보 DNS record type 1) A IP 주소와 도메인 주소를 매핑할 때 사용하는 에코드로써 하나의 도메인에 여러 개의 IP 주소를 등록할 수 있다. 예를들면 naver.com의 A레코드를 조회하였을 때 125.209.222.141, 125.209.222.142, 223.130.195.200, 233.130.195.95의 IP주소가 매핑되..

    [network] switching routing

    routing 한 네트워크에서 다른 네트워크로 패킷을 이동시키는 과정과 네트워크 안의 호스트에게 패킷들을 전달하는 과정 경로 설정 : 데이터 패킷이 출발지부터 목적지까지 갈 수 있는 경로를 검사하고 어떤 경로로 가는 것이 최선인지 결정 스위칭 : 경로 설정이 결정될 경우 데이터 패킷 스위칭 작업을 함 routing table 패킷이 목적지, 목적지까지의 거리와 가는 방법 등을 명시하고 있는 테이블 시간에 따라 주기적으로 업데이트하며 라우터기기의 손상이나 새로운 경로 생성이나 제거에 따라 변화함 $ route 명령어로 확인 가능 destination : 목적지 gateway : 외부 네트워크와 연결하기 위한 게이트웨이 주소 genmast : 목적지 네트워크의 넷마스크 주소. 255.255.255.255로 ..