Certified Kubernetes Administrator (CKA) with Practice Tests (강의 링크, 레퍼런스 노트)
kubectl create user [사용자명]
kubectl list users
kubectl create serviceaccount [계정명]
kubectl get serviceaccount
kubectl
로 접근curl [경로]
로 접근--basic-auth-file=[csv파일명].csv
추가--basic-auth-file=[csv파일명].csv
추가curl -v -k [경로] -u "사용자:비밀번호"
처럼 사용--token-auth-file=[토큰파일명].csv
추가curl -v -k [경로] --header "Authorization: Bearer [토큰]
처럼 사용ssh-keygen
cat ~/.ssh/authorized_keys
openssl genrsa -out [개인키명].key 1024
openssl rsa -in [개인키명].key -pubout > [공개키명].[pem]
openssl req -new -key [개인키명].key -out [이름].csr -subj "/C=US/ST=CA/O=MyOrg,Inc./CN=mydomain.com"
openssl genrsa -out ca.key
openssl req -new -key ca.key -subj "/CN=KUBERNETES-CA" -out ca.csr
openssl x509 -req -in ca.csr -signkey ca.key -out ca.crt
openssl genrsa -out admin.key
openssl req -new -key admin.key -subj "/CN=kube-admin/O=system:masters" -out admin.csr
openssl x509 -req -in admin.csr -CA ca.crt -CAkey ca.key -out admin.crt
curl https://kube-apiserver:6443/api/v1/pods --key admin.key --cert admin.crt --cacert ca.crt
openssl genrsa -out apiserver.key 2048
openssl req -new -key apiserver.key -subj "/CN=kube-apiserver" -out apiserver.csr -config openssl.cnf
openssl x509 -req -in apiserver.csr -CA ca.crt -CAkey ca.key -out apiserver.crt
/etc/kubernetes/manifests/kube-apiserver.yaml
/etc/systemd/system/kube-apiserver.service
openssl x509 -in /etc/kubernetes/pki/apiserver.crt -text -noout
kubeadm logs [pod명]
docker logs [컨테이너ID]
혹은 crictl logs [컨테이너ID]
journalctl -u etcd.service -l
openssl genrsa -out jane.key 2048
openssl req -new -key jane.key -subj "/CN=jane" -out jane.csr
cat jane.csr | base64 | tr -d "\n"
혹은 cat jane.csr | base64 -w 0
등을 통해 인코딩된 텍스트kubectl get csr
kubectl certificate approve jane
: 승인kubectl certificate deny jane
: 거절kubectl get csr jane -o yaml
echo [status:certificate 하위 인코딩 텍스트] | base64 --decode
kubectl get pods --kubeconfig config
kubectl get pods
만 작성해도 됨kubectl config view
kubectl config view --kubeconfig=[config명]
kubectl config use-context [context명]
cat [파일경로] | base64
echo "[인코딩된 내용]" | base64 --decode
cka 자격증 준비중이고, udemy에서 현재 security부분 듣고 있는데요
시험에서 해당 영역도 나올까요?
이 부분 좀 어렵고 길고 해서 시험에 해당 하는 영역이 아니면 가볍게 듣고 넘기고 싶어서요 ㅠㅠ