본문 바로가기

전체 글345

Practice Test - Imperative Command ㅁ Deploy a pod named nginx-pod using the nginx:alpine image kubectl run nginx-pod --image=nginx:alpine ㅁ Deploy a redis pod using the redis:alpine image with the labels set to tier=db kubectl run redis --image=redis:alpine --label=tier-db ㅁ Create a service redis-service to expose the redis application within the cluster on port 6379 kubectl expose pod redis --name redis-service --port 6379 --ta.. 2021. 3. 25.
CKA Tip 2: Imperative Command with kubectl [Pod] - Create an NGINX Pod kubectl run nginx --image=nginx - Generate POD Manifest YAML file (-o yaml). Don't create it(--dry-run) kubectl run nginx --image=nginx --dry-run=client -o yaml [Deployment] - create a deployment kubectl create deploymnet --iage=nginx nginx - Generate Deployment YAML file (-o yaml). Don't create it (--dry-run) kubectl create deployment --image=nginx nginx --dry-run -o.. 2021. 3. 25.
Imperative vs Declarative 2021. 3. 24.
Practice Test - Service ㅁ How many Services exist on the system? in the current(default) namespace kubectl get services ㅁ What is the type of the default kubernetes service? kubectl get services --all-namespaces ㅁ What is the targetPort configured on the kubernetes service? ㅁ How many labels are configured on the kubernetes service ㅁ How many Endpoints are attached on the kubernetes service? kubectl describe service ku.. 2021. 3. 24.
Service 2021. 3. 24.
Namespaces & Practic Test 같은 namespace에서의 호출은 단순히 서비스 네임만 호출 mysql.connect("db-service") mysql.connect("db-service") 다른 namespace로의 호출은 서비스 네임 다음에 namesapce.svc.clustername을 붙인다. dev namespace에 있는 db-service를 호출한다면 mysql.connect("db-service.dev.svc.cluster.local") mysql.connect("db-service.dev.svc.cluster.local") default namespace에서의 pod 조회 kubectl get pods kube-system namespace 에 대해서 조회할 경우 kubectl get pods --namespace=.. 2021. 3. 24.