From 38aaea849a72ecbb76d29fa05e78cd2f750ee6fa Mon Sep 17 00:00:00 2001 From: abregman Date: Mon, 15 Jun 2020 09:41:32 +0300 Subject: [PATCH] Add a couple of questions --- README.md | 152 ++++++++++++++++++---------- certificates/cka.md | 39 +++++++ certificates/cloud-practitioner.md | 6 ++ exercises/grep_berfore_and_after.md | 1 + 4 files changed, 144 insertions(+), 54 deletions(-) create mode 100644 exercises/grep_berfore_and_after.md diff --git a/README.md b/README.md index 0ec5262..2f6b70f 100644 --- a/README.md +++ b/README.md @@ -24,7 +24,7 @@ DevOps
DevOps

Beginner :baby:
Advanced :star: Jenkins
Jenkins

Beginner :baby:
Advanced :star: - Git
Git

Beginner :baby:
Advanced :star: + Git
Git
ansible
Ansible
Network
Network

Beginner :baby:
Advanced :star: Linux
Linux

Beginner :baby:
Advanced :star: @@ -47,7 +47,7 @@ azure
Azure

Beginner :baby:
Google Cloud Platform
Google Cloud Platform

Beginner :baby:
openstack
OpenStack

Beginner :baby:
Advanced :star: - security
Security

Beginner :baby:
Advanced :star: + security
Security
puppet
Puppet

Beginner :baby:
Advanced :star: OpenShift
OpenShift

Beginner :baby:
@@ -55,7 +55,7 @@ Monitoring
Monitoring

Beginner :baby:
Elastic
Elastic
Virtualization
Virtualization

Beginner :baby:
- DNS
DNS

Beginner :baby:
+ DNS
DNS
Operating System
Operating System
Distributed
Distributed
General
General

Beginner :baby:
@@ -65,7 +65,7 @@ Testing
Testing
Databases
Databases
RegEx
Regex

Beginner :baby:
- Design
Design
+ Design
System Design
Hardware
Hardware
Big Data
Big Data
you
Questions you ask
@@ -835,6 +835,12 @@ More on storage classes [here](https://aws.amazon.com/s3/storage-classes) Glacier Deep Archive +
+What Glacier retrieval options are available for the user?
+ +Expedited, Standard and Bulk +
+
True or False? Each AWS account can store up to 500 PetaByte of data. Any additional storage will cost double
@@ -4240,6 +4246,10 @@ False. A Kubernetes cluster consists of at least 1 master and 0 or more workers. * Container runtime - the engine runs the containers (Podman, Docker, ...)
+
+What is kubectl?
+
+ #### Basic Commands
@@ -4254,6 +4264,41 @@ False. A Kubernetes cluster consists of at least 1 master and 0 or more workers. `kubectl get pods --all-namespaces`
+
+How to list all namespaces?
+ +`kubectl get namespaces` +
+ +
+How to create a deployment?
+ +``` +cat << EOF | kubectl create -f - +> apiVersion: v1 +> kind: Pod +> metadata: +> name: nginx +> spec: +> containers: +> - name: nginx +> image: nginx +> EOF +``` +
+ +
+How to print information on a specific pod?
+ +`kubectl describe pod pod_name` +
+ +
+How to delete a pod?
+ +`kubectl delete pod pod_name` +
+
Describe in detail what the following command does kubectl create deployment kubernetes-httpd --image=httpd
@@ -4333,7 +4378,6 @@ open source toolkit used to manage k8s native applications, called operators, in 3. Operator Metering - Enables usage reporting for operators that provide specialized services -
Describe in detail what is the Operator Lifecycle Manager
@@ -4349,26 +4393,6 @@ It includes: * olm-operator - Deploys applications defined by ClusterServiceVersion resource
-#### Kubernetes Commands - -
-What is kubectl?
-
- -
-How do you: - - * Check the cluster status? - * Check the status of the nodes?
-
- -
-What the following commands do? - - * kubectl get nodes - * kubectl get pods --all-namespaces
-
-
What is kubconfig? What do you use it for?
@@ -4637,10 +4661,10 @@ You can usually use the function hash() to check an object mutability. If an obj * 1 == 'one' * 2 > 'one'
- * False - * True - * False - * TypeError +* False +* True +* False +* TypeError
@@ -4652,15 +4676,18 @@ You can usually use the function hash() to check an object mutability. If an obj * "abc"*True * "abc"*False
- * abcabcabc - * TypeError - * TypeError - * "abc" - * "" +* abcabcabc +* TypeError +* TypeError +* "abc" +* ""
What is the result of `bool("")`? What about `bool(" ")`?
+ +bool("") -> evaluates to False +bool(" ") -> evaluates to True
@@ -4681,19 +4708,20 @@ if char == "a" or char == "y" or char == "o" or char == "e" or char =="u" or ch
``` -if lower(input("Insert a character: ")[0]) in "aieou": # Takes care of multiple characters and small/Capital cases +char = input("Insert a character: ") # For readablity +if lower(char[0]) in "aieou": # Takes care of multiple characters and separate cases print("It's a vowel!") ``` OR ``` -char = input("Insert a character: ") # For readablity -if lower(char[0]) in "aieou": # Takes care of multiple characters and separate cases +if lower(input("Insert a character: ")[0]) in "aieou": # Takes care of multiple characters and small/Capital cases print("It's a vowel!") ```
How to define a function with Python?
+Using the `def` keyword
@@ -6097,9 +6125,6 @@ Alert manager is responsible for alerts ;) ## Git - -#### :baby: Beginner -
What is the difference between git pull and git fetch?
@@ -6185,6 +6210,10 @@ git checkout HEAD~1 -- /path/of/the/file ```
+
+How to squash last two commits?
+
+
What is the .git directory? What can you find there?
The .git folder contains all the information that is necessary for your project in version control and all the information about commits, remote repository address, etc. All of them are present in this folder. It also contains a log that stores your commit history so that you can roll back to history. @@ -6235,9 +6264,6 @@ If you would like to also discard the changes you `git reset --hard`` False. If you would like to keep a file on your filesystem, use `git reset `
- -#### :star: Advanced -
Explain Git octopus merge
@@ -7050,7 +7076,7 @@ An availability set is a logical grouping of VMs that allows Azure to understand What storage options Azure supports?
-#### Security +#### Azure Security
What is the Azure Security Center? What are some of its features?
@@ -7602,9 +7628,6 @@ A list of services and their endpoints ## Security - -#### :baby: Beginner -
Can you describe the DevSecOps core principals? (or what is DevSecOps)
@@ -7720,6 +7743,10 @@ You can test by using a stored procedure, so the application must be sanitize th What is DDoS attack? How do you deal with it?
+
+What is port scanning? When is it used?
+
+
What is the difference between asynchronous and synchronous encryption?
@@ -7840,9 +7867,6 @@ A buffer overflow (or buffer overrun) occurs when the volume of data exceeds the Explain what is Docker Bench
- -#### :baby: Advanced -
Explain MAC flooding attack
@@ -8236,9 +8260,6 @@ You can generate certificates with the provided elastic utils and change configu ## DNS - -#### :baby: Beginner -
What is DNS? What is it used for?
@@ -8307,6 +8328,7 @@ MX (Mail Exchange) Specifies a mail exchange server for the domain, which allows
Is DNS using TCP or UDP?
+ DNS uses UDP port 53 for resolving queries either regular or reverse. DNS uses TCP for zone transfer.
@@ -8612,6 +8634,10 @@ In Copyleft, any derivative work must use the same licensing while in permissive How a search engine works?
+
+How auto completion works?
+
+
What is faster than RAM?
@@ -8935,7 +8961,7 @@ Bonus: extract the last word of each line Replace 'red' with 'green'
-## Design +## System Design #### Architecture @@ -9046,6 +9072,20 @@ DNS redirection Explain "Branch by Abstraction" technique
+#### Design a system + +
+Can you design a video streaming website?
+
+ +
+Can you design a photo upload website?
+
+ +
+How would you build a URL shortener?
+
+ ## Hardware
@@ -9181,6 +9221,10 @@ Below you can find several exercises * [CI for open source project](exercises/ci_for_open_source_project.md) +#### Python + +* [grep before and after](exercises/grep_berfore_and_after.md) + #### Mixed * [Flask, Containers and CI](exercises/flask_container_ci/README.md) diff --git a/certificates/cka.md b/certificates/cka.md index 9970b55..5ca3aac 100644 --- a/certificates/cka.md +++ b/certificates/cka.md @@ -13,3 +13,42 @@ `kubectl get pods --all-namespaces`
+ +
+How to list all namespaces?
+ +`kubectl get namespaces` +
+ +
+How to create a deployment?
+ +``` +cat << EOF | kubectl create -f - +> apiVersion: v1 +> kind: Pod +> metadata: +> name: nginx +> spec: +> containers: +> - name: nginx +> image: nginx +> EOF +``` +
+ +
+How to print information on a specific pod?
+ +`kubectl describe pod pod_name` +
+ +
+How to delete a pod?
+ +`kubectl delete pod pod_name` +
+ +
+How to check the status of all the components?
+
diff --git a/certificates/cloud-practitioner.md b/certificates/cloud-practitioner.md index 90cd51d..94e3c03 100644 --- a/certificates/cloud-practitioner.md +++ b/certificates/cloud-practitioner.md @@ -316,6 +316,12 @@ More on storage classes [here](https://aws.amazon.com/s3/storage-classes) Glacier Deep Archive
+
+What Glacier retrieval options are available for the user?
+ +Expedited, Standard and Bulk +
+
True or False? Each AWS account can store up to 500 PetaByte of data. Any additional storage will cost double
diff --git a/exercises/grep_berfore_and_after.md b/exercises/grep_berfore_and_after.md new file mode 100644 index 0000000..6de7a1c --- /dev/null +++ b/exercises/grep_berfore_and_after.md @@ -0,0 +1 @@ +Implement the following grep command in Python (numbers can be different): `grep error -A 2 -B 2 some_file`