자격증 4

[CKA] 1차 시험 불합격.. 기억나는 대로 써보는 문제들. 1

1. Clusterrole 만들고 ServiceAccount와 특정 Namespace로 Binding 특정 리소스 타입만 허용 ClusterRole 예제 apiVersion: rbac.authorization.k8s.io/v1 kind: ClusterRole metadata: name: secret-reader rules: - apiGroups: [""] resources: ["secrets"] verbs: ["get", "watch", "list"] # Role는 metadata: 아래에 namespace: 항목이 있지만 ClusterRole은 모든 namespace에 적용되기 때문에 해당 항목이 없다. ClusterRoleBinding 예제 apiVersion: rbac.authorization.k8..

IT/CKA 2022.03.06

[CKA] Mock Exam 2 풀이

1. Take a backup of the etcd cluster and save it to /opt/etcd-backup.db. # ETCD 백업문제, 백업 말고 Restore 쪽도 공부 해야한다. $ cd /etc/kubernetes/manifests $ cat etcd.yaml # ca.crt / server.crt / server.key 경로를 확이하고 다음 명령어를 실행 $ ETCDCTL_API=3 etcdctl --cacert= --cert= --key= snapshot save /opt/etcd-backup.db 2. Create a Pod called redis-storage with image: redis:alpine with a Volume of type emptyDir that las..

IT/CKA 2022.02.23

[CKA] Mock Exam 1 풀이

1. Deploy a pod named nginx-pod using the nginx:alpine image. # nginx-pod 라는 이름의 pod를 nginx:alpine 이라는 이미지를 사용하여 배포하라. $ kubectl run nginx-pod --image=nginx:alpine 2. Deploy a messaging pod using the redis:alpine image with the labels set to tier=msg. # messaging 이라는 pod를 redis:alpine 이라는 이미지를 사용하여 배포하라. lables는 tier=msg로 설정. $ kubectl run messaging --image=redis:alpine --labels=tier=msg 3. Crea..

IT/CKA 2022.02.23