Add a couple of containers questions
This commit is contained in:
parent
738e582468
commit
a9dc2202ca
@ -2,12 +2,14 @@
|
||||
|
||||
:information_source: This repo contains questions and exercises on various technical topics, sometimes related to DevOps and SRE
|
||||
|
||||
:bar_chart: There are currently **2292** exercises and questions
|
||||
:bar_chart: There are currently **2322** exercises and questions
|
||||
|
||||
:books: To learn more about DevOps and SRE, check the resources in [devops-resources](https://github.com/bregman-arie/devops-resources) repository
|
||||
|
||||
:warning: You can use these for preparing for an interview but most of the questions and exercises don't represent an actual interview. Please read [FAQ page](faq.md) for more details
|
||||
|
||||
:stop_sign: If you are interested in pursuing a career as DevOps engineer, learning some of the concepts mentioned here would be useful but you should know it's not about learning all the topics and technologies mentioned in this repository
|
||||
|
||||
:busts_in_silhouette: Join our [DevOps community](https://www.facebook.com/groups/538897960007080) where we have discussions and share resources on DevOps
|
||||
|
||||
:pencil: You can add more exercises by submitting pull requests :) Read about contribution guidelines [here](CONTRIBUTING.md)
|
||||
@ -2855,6 +2857,7 @@ The introduction of virtual machines allowed companies to deploy multiple busine
|
||||
|
||||
<details>
|
||||
<summary>Explain inheritance and how to use it in Python</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Explain and demonstrate class attributes & instance attributes</summary><br><b>
|
||||
@ -7145,6 +7148,10 @@ In multi-CDN, content is distributed across multiple different CDNs, each might
|
||||
<summary>Explain "3-Tier Architecture" (including pros and cons)</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Explain Mono-repo vs. Multi-repo. What are the cons and pros of each approach?</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What are the drawbacks of monolithic architecture?</summary><br><b>
|
||||
|
||||
|
@ -4,7 +4,8 @@
|
||||
|
||||
|Name|Topic|Objective & Instructions|Solution|Comments|
|
||||
|--------|--------|------|----|----|
|
||||
|Running Containers|Intro|[Exercise](running_containers.md)|[Solution](solutions/running_containers.md)
|
||||
|Running Containers|Basics|[Exercise](running_containers.md)|[Solution](solutions/running_containers.md)
|
||||
|Containerized Web Server|Basics|[Exercise](containerized_web_server.md)|[Solution](solutions/containerized_web_server.md)
|
||||
|Working with Images|Image|[Exercise](working_with_images.md)|[Solution](solutions/working_with_images.md)
|
||||
|My First Dockerfile|Dockerfile|[Exercise](write_dockerfile_run_container.md)|
|
||||
|Run, Forest, Run!|Restart Policies|[Exercise](run_forest_run.md)|[Solution](solutions/run_forest_run.md)
|
||||
@ -14,6 +15,24 @@
|
||||
|
||||
### Containers Self Assessment
|
||||
|
||||
* [Containers 101](#questions-containers-101)
|
||||
* [OCI](#questions-oci)
|
||||
* [Images](#questions-images)
|
||||
* [Basic Commands](#questions-basic-commands)
|
||||
* [Volume](#questions-volume)
|
||||
* [Dockerfile](#questions-dockerfile)
|
||||
* [Architecture](#questions-architecture)
|
||||
* [Docker Architecture](#questions-docker-architecture)
|
||||
* [Docker Compose](#questions-docker-compose)
|
||||
* [Docker Images](#questions-docker-images)
|
||||
* [Networking](#questions-networking)
|
||||
* [Docker Networking](#questions-docker-networking)
|
||||
* [Security](#questions-security)
|
||||
* [Docker In Production](#questions-docker-in-production)
|
||||
|
||||
<a name="questions-containers-101"></a>
|
||||
#### Containers 101
|
||||
|
||||
<details>
|
||||
<summary>What is a Container?</summary><br><b>
|
||||
|
||||
@ -70,6 +89,15 @@ You should choose containers when:
|
||||
4. Run the container using the image you've built
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What are some of the advantages in using containers? you can compare to other options like VMs</summary><br><b>
|
||||
|
||||
* Reusable: container can be used by multiple different users for different usages - production vs. staging, development, testing, etc.
|
||||
* Lightweight: containers are fairly lightweight which means deployments can be done quickly since you don't need to install a full OS (as in VMs for example)
|
||||
* Isolation: Containers are isolated environments, usually changes made to the OS won't affect the containers and vice-versa
|
||||
</b></details>
|
||||
|
||||
<a name="questions-oci"></a>
|
||||
#### Containers - OCI
|
||||
|
||||
<details>
|
||||
@ -89,68 +117,7 @@ Specifications published by OCI:
|
||||
Create, Kill, Delete, Start and Query State.
|
||||
</b></details>
|
||||
|
||||
#### Containers - Basic Commands
|
||||
|
||||
<details>
|
||||
<summary>How to list all the containers on a given host?</summary><br><b>
|
||||
|
||||
In the case of Docker, use: `docker container ls`<br>
|
||||
In the case of Podman, it's not very different: `podman container ls`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>How to run a container?</summary><br><b>
|
||||
|
||||
Docker: `docker container run ubuntu`<br>
|
||||
Podman: `podman container run ubuntu`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Why after running <code>podman container run ubuntu</code> the output of <code>podman container ls</code> is empty?</summary><br><b>
|
||||
|
||||
Because the container immediately exits after running the ubuntu image. This is completely normal and expected as containers designed to run a service or a app and exit when they are done running it.<br>
|
||||
|
||||
If you want the container to keep running, you can run a command like `sleep 100` which will run for 100 seconds or you can attach to terminal of the container with a command similar: `podman container run -it ubuntu /bin/bash`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>How to attach your shell to a terminal of a running container?</summary><br><b>
|
||||
|
||||
`podman container exec -it [container id/name] bash`
|
||||
|
||||
This can be done in advance while running the container: `podman container run -it [image:tag] /bin/bash`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? You can remove a running container if it doesn't running anything</summary><br><b>
|
||||
|
||||
False. You have to stop the container before removing it.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>How to stop and remove a container?</summary><br><b>
|
||||
|
||||
`podman container stop <container id/name> && podman container rm <container id/name>`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What happens when you run <code>docker container run ubuntu</code>?</summary><br><b>
|
||||
|
||||
1. Docker client posts the command to the API server running as part of the Docker daemon
|
||||
2. Docker daemon checks if a local image exists
|
||||
1. If it exists, it will use it
|
||||
2. If doesn't exists, it will go to the remote registry (Docker Hub by default) and pull the image locally
|
||||
3. containerd and runc are instructed (by the daemon) to create and start the container
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>How to run a container in the background?</summary><br><b>
|
||||
|
||||
With the -d flag. It will run in the background and will not attach it to the terminal.
|
||||
|
||||
`docker container run -d httpd` or `podman container run -d httpd`
|
||||
</b></details>
|
||||
|
||||
<a name="questions-images"></a>
|
||||
#### Containers - Images
|
||||
|
||||
<details>
|
||||
@ -168,13 +135,39 @@ With the -d flag. It will run in the background and will not attach it to the te
|
||||
* Containers intended to run specific application in most cases. This means they hold only what the application needs in order to run
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>You are interested in running a container with snake game application. How can you search for such image and check if it exists?</summary><br><b>
|
||||
|
||||
`podman search snake-game`. Surprisingly, there are a couple of matches :)
|
||||
|
||||
```
|
||||
INDEX NAME DESCRIPTION STARS
|
||||
docker.io docker.io/dyego/snake-game 0
|
||||
docker.io docker.io/ainizetap/snake-game 0
|
||||
docker.io docker.io/islamifauzi/snake-games 0
|
||||
docker.io docker.io/harish1551/snake-game 0
|
||||
docker.io docker.io/spkane/snake-game A console based snake game in a container 0
|
||||
docker.io docker.io/rahulgadre/snake-game This repository contains all the files to ru... 0
|
||||
```
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>How to list the container images on certain host?</summary><br><b>
|
||||
|
||||
`podman image ls`<br>
|
||||
`docker image ls`
|
||||
CONTAINER_BINARY=podman # or docker
|
||||
$CONTAINER_BINARY images
|
||||
```
|
||||
|
||||
Depends on which containers engine you use.
|
||||
Note: you can also use `$CONTAINER_RUNTIME image ls`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>How to download/pull a container image without actually running a container?</summary><br><b>
|
||||
|
||||
```
|
||||
CONTAINER_BINARY=podman # or docker
|
||||
$CONTAINER_BINARY pull rhel
|
||||
```
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
@ -203,7 +196,7 @@ Registry: https://index.docker.io/v1
|
||||
<details>
|
||||
<summary>How to retrieve the latest ubuntu image?</summary><br><b>
|
||||
|
||||
`docker image pull ubuntu:latest`
|
||||
`podman image pull ubuntu:latest`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
@ -381,6 +374,71 @@ Cons:
|
||||
* Push and pull can take more time (because no matching layers found on target)
|
||||
</b></details>
|
||||
|
||||
<a name="questions-basic-commands"></a>
|
||||
#### Containers - Basic Commands
|
||||
|
||||
<details>
|
||||
<summary>How to list all the containers on a given host?</summary><br><b>
|
||||
|
||||
In the case of Docker, use: `docker container ls`<br>
|
||||
Same with Podman: `podman container ls`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>How to run a container?</summary><br><b>
|
||||
|
||||
Docker: `docker container run ubuntu`<br>
|
||||
Podman: `podman container run ubuntu`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Why after running <code>podman container run ubuntu</code> the output of <code>podman container ls</code> is empty?</summary><br><b>
|
||||
|
||||
Because the container immediately exits after running the ubuntu image. This is completely normal and expected as containers designed to run a service or a app and exit when they are done running it.<br>
|
||||
|
||||
If you want the container to keep running, you can run a command like `sleep 100` which will run for 100 seconds or you can attach to terminal of the container with a command similar: `podman container run -it ubuntu /bin/bash`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>How to attach your shell to a terminal of a running container?</summary><br><b>
|
||||
|
||||
`podman container exec -it [container id/name] bash`
|
||||
|
||||
This can be done in advance while running the container: `podman container run -it [image:tag] /bin/bash`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>True or False? You can remove a running container if it doesn't running anything</summary><br><b>
|
||||
|
||||
False. You have to stop the container before removing it.
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>How to stop and remove a container?</summary><br><b>
|
||||
|
||||
`podman container stop <container id/name> && podman container rm <container id/name>`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What happens when you run <code>docker container run ubuntu</code>?</summary><br><b>
|
||||
|
||||
1. Docker client posts the command to the API server running as part of the Docker daemon
|
||||
2. Docker daemon checks if a local image exists
|
||||
1. If it exists, it will use it
|
||||
2. If doesn't exists, it will go to the remote registry (Docker Hub by default) and pull the image locally
|
||||
3. containerd and runc are instructed (by the daemon) to create and start the container
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>How to run a container in the background?</summary><br><b>
|
||||
|
||||
With the -d flag. It will run in the background and will not attach it to the terminal.
|
||||
|
||||
`docker container run -d httpd` or `podman container run -d httpd`
|
||||
</b></details>
|
||||
|
||||
|
||||
<a name="questions-volume"></a>
|
||||
#### Containers - Volume
|
||||
|
||||
<details>
|
||||
@ -389,6 +447,7 @@ Cons:
|
||||
`docker volume create some_volume`
|
||||
</b></details>
|
||||
|
||||
<a name="questions-dockerfile"></a>
|
||||
#### Containers - Dockerfile
|
||||
|
||||
<details>
|
||||
@ -479,6 +538,7 @@ Instructions such as ENTRYPOINT, ENV, EXPOSE, create image metadata and they don
|
||||
<summary>Is it possible to identify which instruction create a new layer from the output of <code>docker image history</code>?</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
<a name="questions-architecture"></a>
|
||||
#### Containers - Architecture
|
||||
|
||||
<details>
|
||||
@ -495,6 +555,18 @@ Through the use of namespaces and cgroups. Linux kernel has several types of nam
|
||||
- Time namespaces: Isolates time machine
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What Linux kernel features does containers use?</summary><br><b>
|
||||
|
||||
* cgroups (Control Groups): used for limiting the amount of resources a certain groups of processes (and their children of course) use. This way, a group of processes isn't consuming all host resources and other groups can run and use part of the resources as well
|
||||
|
||||
* namespaces: same as cgroups, namespaces isolate some of the system resources so it's available only for processes in the namespace. Differently from cgroups the focus with namespaces is on resources like mount points, IPC, network, ... and not about memory and CPU as in cgroups
|
||||
|
||||
* SElinux: the access control mechanism used to protect processes. Unfortunately to this date many users don't actually understand SElinux and some turn it off but nontheless, it's a very important security feature of the Linux kernel, used by container as well
|
||||
|
||||
* Seccomp: similarly to SElinux, it's also a security mechanism, but its focus is on limiting the processes in regards to using system calls and file descriptors
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Describe in detail what happens when you run `podman/docker run hello-world`?</summary><br><b>
|
||||
|
||||
@ -505,7 +577,7 @@ Docker/Podman daemon redirects output from container to Docker CLI which redirec
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Describe difference between cgroups and namespaces </summary><br><b>
|
||||
<summary>Describe difference between cgroups and namespaces</summary><br><b>
|
||||
cgroup: Control Groups provide a mechanism for aggregating/partitioning sets of tasks, and all their future children, into hierarchical groups with specialized behavior.
|
||||
namespace: wraps a global system resource in an abstraction that makes it appear to the processes within the namespace that they have their own isolated instance of the global resource.
|
||||
|
||||
@ -526,6 +598,22 @@ Multiple namespaces: pid,net, mnt, uts, ipc, user
|
||||
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Which of the following are Linux features that containers use?
|
||||
|
||||
* cspaces
|
||||
* namegroups
|
||||
* namespaces
|
||||
* cgroups
|
||||
* ELlinux
|
||||
* SElinux</summary><br><b>
|
||||
|
||||
* namespaces
|
||||
* cgroups
|
||||
* SElinux
|
||||
</b></details>
|
||||
|
||||
<a name="questions-docker-architecture"></a>
|
||||
#### Containers - Docker Architecture
|
||||
|
||||
<details>
|
||||
@ -702,6 +790,7 @@ Because each container has its own writable container layer, and all changes are
|
||||
<summary>How do you copy files from Docker container to the host and vice versa?</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
<a name="questions-docker-compose"></a>
|
||||
#### Containers - Docker Compose
|
||||
|
||||
<details>
|
||||
@ -720,6 +809,7 @@ In general, it's useful for running applications which composed out of several d
|
||||
* Run `docker-compose up` to run the services
|
||||
</b></details>
|
||||
|
||||
<a name="questions-docker-images"></a>
|
||||
#### Containers - Docker Images
|
||||
|
||||
<details>
|
||||
@ -776,6 +866,7 @@ By default, Docker uses everything (all the files and directories) in the direct
|
||||
`.dockerignore` used for excluding files and directories from the build context
|
||||
</b></details>
|
||||
|
||||
<a name="questions-networking"></a>
|
||||
#### Containers - Networking
|
||||
|
||||
<details>
|
||||
@ -788,6 +879,7 @@ CNI (Container Network Interface):
|
||||
* Network configuration should be in JSON format
|
||||
</b></details>
|
||||
|
||||
<a name="questions-docker-networking"></a>
|
||||
#### Containers - Docker Networking
|
||||
|
||||
<details>
|
||||
@ -823,6 +915,7 @@ True. An endpoint can connect only to a single network.
|
||||
* network control plane and management plane
|
||||
</b></details>
|
||||
|
||||
<a name="questions-security"></a>
|
||||
#### Containers - Security
|
||||
|
||||
<details>
|
||||
@ -843,6 +936,7 @@ True. An endpoint can connect only to a single network.
|
||||
* DO NOT run containers with `--privilged` flag
|
||||
</b></details>
|
||||
|
||||
<a name="questions-docker-in-production"></a>
|
||||
#### Containers - Docker in Production
|
||||
|
||||
<details>
|
||||
@ -879,9 +973,3 @@ Restart Policies. It allows you to automatically restart containers after certai
|
||||
* no: don't restart the container at any point (default policy)
|
||||
* on-failure: restart the container when it exists due to an error (= exit code different than zero)
|
||||
</b></details>
|
||||
|
||||
#### Containers - Docker Misc
|
||||
<details>
|
||||
<summary>Explain what is Docker Bench</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
|
5
exercises/containers/containerized_web_server.md
Normal file
5
exercises/containers/containerized_web_server.md
Normal file
@ -0,0 +1,5 @@
|
||||
# Containerized Web Server
|
||||
|
||||
1. Run a containerized web server in the background and bind its port (8080) to a local port
|
||||
2. Verify the port (8080) is bound
|
||||
3. Reach the webserver from your local host
|
@ -2,7 +2,7 @@
|
||||
|
||||
### Objective
|
||||
|
||||
Learn how to run containers
|
||||
Learn how to run, stop and remove containers
|
||||
|
||||
### Requirements
|
||||
|
||||
|
21
exercises/containers/solutions/containerized_web_server.md
Normal file
21
exercises/containers/solutions/containerized_web_server.md
Normal file
@ -0,0 +1,21 @@
|
||||
# Containerized Web Server
|
||||
|
||||
1. Run a containerized web server in the background and bind its port (8080) to a local port
|
||||
2. Verify the port (8080) is bound
|
||||
3. Reach the webserver from your local host
|
||||
|
||||
## Solution
|
||||
|
||||
```
|
||||
$ podman run -d -p 8080 httpd # run the container and bind the port 8080 to a local port
|
||||
$ podman port -l 8080 # show to which local port the port 8080 on the container, binds to
|
||||
0.0.0.0:41203
|
||||
$ curl http://0.0.0.0:41203 # use the port from the output of the previous command
|
||||
|
||||
!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
|
||||
|
||||
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
|
||||
<head>
|
||||
<title>Test Page for the HTTP Server on Red Hat Enterprise Linux</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
```
|
@ -2,7 +2,7 @@
|
||||
|
||||
### Objective
|
||||
|
||||
Learn how to run containers
|
||||
Learn how to run, stop and remove containers
|
||||
|
||||
### Requirements
|
||||
|
||||
|
@ -1,7 +1,5 @@
|
||||
## Kubernetes
|
||||
|
||||
<a name="kubernetes"></a>
|
||||
|
||||
### Kubernetes Exercises
|
||||
|
||||
#### Developer & "Regular" User Path
|
||||
@ -17,6 +15,26 @@
|
||||
|
||||
### Kubernetes Self Assessment
|
||||
|
||||
* [Kubernetes 101](#kubernetes-101)
|
||||
* [Kubernetes Hands-On Basics](#kubernetes-hands-on-basiscs)
|
||||
* [Kubernetes Cluster](#kubernetes-cluster)
|
||||
* [Kubernetes Pods](#kubernetes-pods)
|
||||
* [Kubernetes Deployments](#kubernetes-deployments)
|
||||
* [Kubernetes Services](#kubernetes-services)
|
||||
|
||||
<a name="kubernetes-101"></a>
|
||||
#### Kubernetes 101
|
||||
|
||||
<details>
|
||||
<summary>What is Kubernetes? Why organizations are using it?</summary><br><b>
|
||||
|
||||
Kubernetes is an open-source system for automating deployment, scaling, and management of containerized applications.
|
||||
|
||||
To understand what Kubernetes is good for, let's look at some examples:
|
||||
|
||||
<a name="kubernetes-101"></a>
|
||||
#### Kubernetes 101
|
||||
|
||||
<details>
|
||||
<summary>What is Kubernetes? Why organizations are using it?</summary><br><b>
|
||||
|
||||
@ -32,12 +50,24 @@ To understand what Kubernetes is good for, let's look at some examples:
|
||||
<details>
|
||||
<summary>When or why NOT to use Kubernetes?</summary><br><b>
|
||||
|
||||
- If you are big team of engineers (e.g. 200) deploying applications using containers and you need to manage scaling, rolling out updates, etc. You probably want to use Kubernetes
|
||||
|
||||
- If you manage low level infrastructure or baremetals, Kubernetes is probably not what you need or want
|
||||
- If you are a small team (e.g. 20-50 engineers) Kubernetes might be an overkill (even if you need scale, rolling out updates, etc.)
|
||||
- If you are a small team (like less than 20 engineers) running less than a dozen of containers, Kubernetes might be an overkill (even if you need scale, rolling out updates, etc.). You might still enjoy the benefits of using managed Kubernetes, but you definitely want to think about it carefully before making a decision
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>What are some of Kubernetes features?</summary><br><b>
|
||||
|
||||
- Self-Healing: Kubernetes uses health checks to monitor containers and run certain actions upon failure or other type of events, like restarting the container
|
||||
- Load Balancing: Kubernetes can split and/or balance requests to applications running in the cluster, based on the state of the Pods running the application
|
||||
- Operators: Kubernetes packaged applications that can use the API of the cluster to update its state and trigger actions based on events and application state changes
|
||||
- Automated Rollout: Gradual updates roll out to applications and support in roll back in case anything goes wrong
|
||||
- Scaling: Scaling horizontally (down and up) based on different state parameters and custom defined criteria
|
||||
- Secrets: you have a mechanism for storing user names, passwords and service endpoints in a private way, where not everyone using the cluster are able to view it
|
||||
</b></details>
|
||||
|
||||
<a name="kubernetes-hands-on-basics"></a>
|
||||
#### Kubernetes - Hands-On Basics
|
||||
|
||||
<details>
|
||||
<summary>What Kubernetes objects are there?</summary><br><b>
|
||||
|
||||
@ -73,11 +103,12 @@ Kubectl is the Kubernetes command line tool that allows you to run commands agai
|
||||
|
||||
<summary>What Kubernetes objects do you usually use when deploying applications in Kubernetes?</summary><br><b>
|
||||
|
||||
* Deployment - creates and the Pods and watches them
|
||||
* Deployment - creates the Pods () and watches them
|
||||
* Service: route traffic to Pods internally
|
||||
* Ingress: route traffic from outside the cluster
|
||||
</b></details>
|
||||
|
||||
<a name="kubernetes-cluster"></a>
|
||||
#### Kubernetes - Cluster
|
||||
|
||||
<details>
|
||||
@ -165,6 +196,7 @@ Apply requests and limits, especially on third party applications (where the unc
|
||||
5. Create an etcd cluster
|
||||
</b></details>
|
||||
|
||||
<a name="kubernetes-pods"></a>
|
||||
#### Kubernetes - Pods
|
||||
|
||||
<details>
|
||||
@ -386,6 +418,7 @@ Only containers whose state set to Success will be able to receive requests sent
|
||||
One reason is that it makes it harder to scale, when you need to scale only one of the containers in a given Pod.
|
||||
</b></details>
|
||||
|
||||
<a name="kubernetes-deployments"></a>
|
||||
#### Kubernetes - Deployments
|
||||
|
||||
<details>
|
||||
@ -453,6 +486,7 @@ Using a Service.
|
||||
An internal load balancer in Kubernetes is called Service and an external load balancer is Ingress
|
||||
</b></details>
|
||||
|
||||
<a name="kubernetes-services"></a>
|
||||
#### Kubernetes - Services
|
||||
|
||||
<details>
|
||||
@ -1055,6 +1089,7 @@ True
|
||||
Namespaces allow you split your cluster into virtual clusters where you can group your applications in a way that makes sense and is completely separated from the other groups (so you can for example create an app with the same name in two different namespaces)
|
||||
</b></details>
|
||||
|
||||
<a name="namespaces-use-cases"></a>
|
||||
<details>
|
||||
<summary>Why to use namespaces? What is the problem with using one default namespace?</summary><br><b>
|
||||
|
||||
@ -1965,3 +2000,11 @@ You can learn more [here](https://submariner-io.github.io)
|
||||
<details>
|
||||
<summary>What is Istio? What is it used for?</summary><br><b>
|
||||
</b></details>
|
||||
|
||||
#### Kubernetes - Scenarios
|
||||
|
||||
<details>
|
||||
<summary>An engineer form your organization told you he is interested only in seeing his team resources in Kubernetes. Instead, in reality, he sees resources of the whole organization, from multiple different teams. What Kubernetes concept can you use in order to deal with it?</summary><br><b>
|
||||
|
||||
Namespaces. See the following [namespaces question and answer](#namespaces-use-cases) for more information.
|
||||
</b></details>
|
||||
|
@ -9,6 +9,14 @@
|
||||
|
||||
### OpenShift Self Assessment
|
||||
|
||||
* [OpenShift 101](#Openshift-101)
|
||||
* [OpenShift Architecture](#Openshift-architecture)
|
||||
* [OpenShift Hands-On Basics](#Openshift-hands-on-basics)
|
||||
* [OpenShift Projects](#Openshift-projects)
|
||||
|
||||
<a name="openshift-101"></a>
|
||||
### OpenShift 101
|
||||
|
||||
<details>
|
||||
<summary>What is OpenShift?</summary><br><b>
|
||||
|
||||
@ -35,18 +43,14 @@ True
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>OpenShift supports many resources. How to get a list of all these resources?</summary><br><b>
|
||||
<summary>What are some of OpenShift added features on top of Kubernetes?</summary><br><b>
|
||||
|
||||
`oc api-resources`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Explain OpenShift CLIs like <code>oc</code> and <code>odo</code></summary><br><b>
|
||||
|
||||
oc is used for creating applications, but also for administrating OpenShift cluster<br>
|
||||
odo is used solely for managing applications on OpenShift (mainly from developers' perspective) and has nothing to do with administrating the cluster
|
||||
- UI: OpenShift provides unified UI out-of-the-box
|
||||
- Routes: Simple procedure for exposing services
|
||||
- Developer Workflow Support: built-in CI/CD (openshift pipelines), built-in container registry and tooling for building artifacts from source to container images
|
||||
</b></details>
|
||||
|
||||
<a name="openshift-architecture"></a>
|
||||
## OpenShift - Architecture
|
||||
|
||||
<details>
|
||||
@ -68,6 +72,23 @@ The Scheduler.
|
||||
Application high availability by spreading pod replicas between worker nodes
|
||||
</b></details>
|
||||
|
||||
<a name="openshift-hands-on-basics"></a>
|
||||
## OpenShift - Hands-On Basics
|
||||
|
||||
<details>
|
||||
<summary>OpenShift supports many resources. How to get a list of all these resources?</summary><br><b>
|
||||
|
||||
`oc api-resources`
|
||||
</b></details>
|
||||
|
||||
<details>
|
||||
<summary>Explain OpenShift CLIs like <code>oc</code> and <code>odo</code></summary><br><b>
|
||||
|
||||
oc is used for creating applications, but also for administrating OpenShift cluster<br>
|
||||
odo is used solely for managing applications on OpenShift (mainly from developers' perspective) and has nothing to do with administrating the cluster
|
||||
</b></details>
|
||||
|
||||
<a name="openshift-projects"></a>
|
||||
## OpenShift - Projects
|
||||
|
||||
<details>
|
||||
|
Loading…
Reference in New Issue
Block a user