CKA (Certified Kubernetes Administrator) 55

kubernetes create vs apply & run

1) kubectl run command kubectl run nginx --image nginx 개발환경에서 사용하는것을 추천한다. 장점 - 클러스터에 특정 오브젝트를 한번에 실행하거나 시작할수 있는 가장 쉬운 방법. (실제 이미지 바로 실행 시킴) 단점 - 기존 설정에 대한 히스토리를 제공하지 않음. - 변경사항이나 audit 내역, 템플릿등을 제공하지 않음. 2) kubectl create command kubectl create -f nginx.yaml 최소한 1개 이상의 YAML file 이나 JSON format file 을 이용해서 Object 를 생성한다. 장점 - 설정파일 내용을 git 같은곳에 저장이 가능하기 때문에 설정에대한 변경 히스토리가 확인 가능한다. - 새로운 object 를 ..

06.Security - View Certificate Details

Security 1) View Certificate Details 2) Certificates API 3) KubeConfig 4) Role Based Access Controls 5) Cluster Roles 6) Service Accounts 7) Image Security 8) Security Contexts 9) Network Policies 01. Identify the certificate file used for the kube-api server ask : /etc/kubernetes/pki/apiserver.crt - --tls-cert-file=/etc/kubernetes/pki/apiserver.crt root@controlplane:~# cat /etc/kubernetes/manif..

05.Cluster Maintenance - Backup and Restore Methods

Cluster Maintenance 1) OS Upgrades 2) Cluster Upgrade Process 3) Backup and Restore Methods 01. We have a working kubernetes cluster with a set of applications running. Let us first explore the setup. How many deployments exist in the cluster? ask : 2 root@controlplane:~# kubectl get deployments NAME READY UP-TO-DATE AVAILABLE AGE blue 3/3 3 3 105s red 2/2 2 2 105s 02. What is the version of ETC..

05.Cluster Maintenance - Cluster Upgrade Process

Cluster Maintenance 1) OS Upgrades 2) Cluster Upgrade Process 3) Backup and Restore Methods 01. This lab tests your skills on upgrading a kubernetes cluster. We have a production cluster with applications running on it. Let us explore the setup first. What is the current version of the cluster? ask : v1.19.0 root@controlplane:~# kubectl get nodes NAME STATUS ROLES AGE VERSION controlplane Ready ..

05.Cluster Maintenance - OS Upgrades

Cluster Maintenance 1) OS Upgrades 2) Cluster Upgrade Process 3) Backup and Restore Methods 01. Let us explore the environment first. How many nodes do you see in the cluster? Including the controlplane and worker nodes. ask : 2 root@controlplane:~# kubectl get nodes NAME STATUS ROLES AGE VERSION controlplane Ready control-plane,master 16m v1.20.0 node01 Ready 16m v1.20.0 02. How many applicatio..

04.Application Lifecycle Management - Init Containers

Application Lifecycle Management 1) Rolling Updates and Rollbacks 2) Commands and Arguments 3) Env Variables 4) Secrets 5) Multi Container PODs 6) Init Containers 01. Identify the pod that has an initContainer configured. ask : blue Run the command kubectl describe pod blue It has an InitContainer called init-myservice controlplane ~ ✖ kubectl describe pod blue Name: blue Namespace: default Prio..

4.Application Lifecycle Management - Multi Container PODs

Application Lifecycle Management 1) Rolling Updates and Rollbacks 2) Commands and Arguments 3) Env Variables 4) Secrets 5) Multi Container PODs 6) Init Containers 01. Identify the number of containers created in the red pod. ask : 3 root@controlplane:~# kubectl get pod -o wide NAME READY STATUS RESTARTS AGE IP NODE NOMINATED NODE READINESS GATES app 1/1 Running 0 2m31s 10.244.0.6 controlplane fl..

4.Application Lifecycle Management - Secrets

Application Lifecycle Management 1) Rolling Updates and Rollbacks 2) Commands and Arguments 3) Env Variables 4) Secrets 5) Multi Container PODs 6) Init Containers 1. How many Secrets exist on the system? in the current(default) namespace ask : 1 controlplane ~ ➜ kubectl get secrets NAME TYPE DATA AGE default-token-f8d9m kubernetes.io/service-account-token 3 14m 2. How many secrets are defined in..

4.Application Lifecycle Management - Env Variables

APPLICATION LIFECYCLE MANAGEMENT, PRACTICE TEST ENV VARIABLES Application Lifecycle Management 1) Rolling Updates and Rollbacks 2) Commands and Arguments 3) Env Variables 4) Secrets 5) Multi Container PODs 6) Init Containers 1. How many PODs exist on the system? in the current(default) namespace ask : 1 controlplane ~ ➜ kubectl get pod NAME READY STATUS RESTARTS AGE webapp-color 1/1 Running 0 24..