Concepts of Kubernetes Flashcards
1
Q
What is a Pod in Kubernetes?
A
- a Kubernetes object that encapsulates containers
- usually 1 to 1 relationship with containers running the application
- single instance of an application
- smalles object that can be created in Kubernetes
2
Q
What do we do, when we want to scale up out application instances in case of rising demand? Or to scale down?
A
- we create a new pod altogether with a new instance of the same application
- scale down: delete an existing pod
3
Q
Are we restricted to running one container in one pod?
A
- no
- in Multi-container pods we usually run containers of different kinds, not the same twice
- sometimes a helper container is added for support task, like processing user input data
- if the second container should always accompany the other, they can be created by default with a new pod and the other container
- share the same fate
- rare use-case
4
Q
What is special about Multi-Container Pods in regards to communication?
A
- the containers can communicate with each other referencing to local host
- since they share the same network space
- also can share easily storage space
5
Q
Are we required to run containers in pods?
A
- yes, kubernetes forces you
- enables long-term flexibility to changes in architecture, helper containers, storage, etc
6
Q
What does the ‘kubectl run <app>' really do?</app>
A
- deploys a Docker container by creating a pod
- automatically creates the pod
- then deploy an instance of the docker-image
7
Q
How can we specify the image, that should be used for the creation of an container?
A
- we need to specify the image name using the ‘image’ parameter
- ‘kubectl run nginx –image nginx’
- then the image is downloaded from the docker hub repository
- repository pulled from can be configured to be also a private repo within the organization
8
Q
With what command can receive more informatio about a specific pod?
A
- ‘kubectl describe pod < pod-name > ‘
9
Q
A