본문 바로가기

CKA &. CKAD/Scheduling

Application Logs

Logs - Docker

docker run -d kodekloud/event-simulator
docker logs -f ecf

 

Logs - Kubernetes

 

event-simulator.yaml

apiVersion: v1
kind: Pod
metadata:
  name: event-simulator-pod
spec:
  containers:
  - name: event-simulator
    image: kodekloud/event-simulator
kubectl create -f event-simulator.yaml
kubectl logs -f event-simulator-pod

event-simulator.yaml

apiVersion: v1
kind: Pod
metadata:
  name: event-simulator-pod
spec:
  containers:
  - name: event-simulator
    image: kodekloud/event-simulator
  - name: image-processor
    image: some-image-processor
kubectl create -f event-simulator.yaml
kubectl logs -f event-simulator-pod

[Practice Test]

ㅁ A user- 'USER5' - has expressed concerns accessing the application. Identify the cause of the issue. Inspect the logs of the POD (webapp-1)

kubectl get pods

kubectl logs -f webapp-1 | grep User5

ㅁ A user is reporting issues while trying to purchase an item. Identify the user and the cause of the issue. 

kubectl get pod 

kubectl logs webapp-2 -c
db       simple-webapp

kubectl logs webapp-2 -c simple-webapp

 

 

'CKA &. CKAD > Scheduling' 카테고리의 다른 글

Configuring Kubernetes Scheduler  (0) 2021.03.26
Multiple Schedulers and Practice Test  (0) 2021.03.26
Practice Test - Static Pods  (0) 2021.03.26
Practice Test - Daemon Sets  (0) 2021.03.26
Practice Test - Resource Limits  (0) 2021.03.26