cka
[kodekloud] 01 Core Concepts : Imperative-Commands 풀이
Q1. Deploy a pod named nginx-pod using the nginx:alpine image. k run nginx-pod --image=nginx:alpine Q2. Deploy a redis pod using the redis:alpine image with the labels set to tier=db. k run redis --image=redis:alpine --labels=tier=db Q3. Create a service redis-service to expose the redis application within the cluster on port 6379. 명령어 예시 공식문서 kubectl expose (-f FILENAME | TYPE NAME) [--port=por..
[kodekloud] 01 Core Concepts : Service 풀이
Q1. How many Services exist on the system? alias k=kubectl; k get services Q2. What is the type of the default kubernetes service? 위에서 k get services 명령어를 통해 type이 clusterIP임을 확인했다. Q3. What is the targetPort configured on the kubernetes service? k describe services # 서비스가 1개만 있기 때문에 위의 명령어로도 가능하지만 정확한 서비스 명과 조회하려면 k describe svc kubernetes Q4. How many labels are configured on the kubernetes se..
[kodekloud] 01 Core Concepts : Namespaces 풀이
Q1. How many namespace exist? controlplane ~ ➜ k get namespaces Q2. How many pods exist in the research namespace? k get pods --namespace=research Q3. Create a POD in the finance namespace. Use the spec given below. Name: redis Image Name: redis k run redis --image=redis -n finance Q4. Which namespace has the blue pod in it? k get pods --all-namespaces | grep blue Q5. Access the Blue web applica..
14. CKA udemy 강의 정리 - Section 7 [Networking]
0. Network Policy 네트워크 정책(network policy)는 쿠버 네티스클러스터 내부에서 파드 간에 통신할 경우 트래픽 룰을 규정하는 것이다. 네트워크 정책을 사용하지 않을 경우 클러스터 내부의 모든 파드는 서로 통신이 가능하다. 그러나 네트워크 정책을 사용할 수 있다면, 네임스페이스별로 트래픽을 전송하지 못하게 하거나 모든 파드간의 통신을 차단하고 특정 파드 간 통신만 허용하는 화이트리스트 방식을 사용할 수 있다. 모든 쿠버네티스 환경에서 네트워크 정책을 사용할 수 있는 것은 아니다! 온프레미스 환경 : Calico 등의 네트워크 정책 지원하는 네트워크 플러그인(CNI플러그인) 사용 GKE : 생성 시 명시적으로 활성화하려면 캘리코가 배포되어 네트워크 정책 사용 네트워크 정책을 지원하지..