분류 전체보기

    [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..

    [React] Form Validation (Formik VS React Hook Form)

    Validation 이란? 서버에 데이터를 제출하기 전에 양식이 올바른지 확인하는 과정 사용자가 데이터를 목적지로 보내기 전에, 올바를 데이터를 입력했는지 유효성을 체크해주는 것. Client Validation react form validation은 client validation check에 해당 1. 사용자에게 편리함을 제공하기 위함 클라이언트 측에서 유효성 체크를 하지 않을 경우, 데이터가 서버까지 다녀온 뒤에야 잘못된 데이터임을 알 수 있다. 시간이 오래걸려 사용자도 불편함을 겪고, 서버도 너무 많이 일을 혼자 하게된다. 2. 이상한 데이터가 들어와 공격당하는 일이 없도록 하기 위한 보안조치 사용자가 의도적으로 이상한 데이터를 넣어 공격을 하는 것을 맊을 수 있다. 하지만 클라이언트 유효성 체..

    [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로 ..