forked from bregman-arie/devops-exercises
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a couple of Virtualization questions
- Loading branch information
abregman
committed
Apr 11, 2021
1 parent
f3f8de0
commit b45aa4a
Showing
2 changed files
with
103 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,7 @@ | ||
## Certified Kubernetes Administrator (CKA) | ||
|
||
#### Basic Commands | ||
|
||
<details> | ||
<summary>Which command you run to view your nodes?</code></summary><br><b> | ||
|
||
`kubectl get nodes` | ||
</b></details> | ||
|
||
<details> | ||
<summary>Which command you run to view all pods running on all namespaces?</code></summary><br><b> | ||
|
||
`kubectl get pods --all-namespaces` | ||
</b></details> | ||
|
||
<details> | ||
<summary>How to list all namespaces?</code></summary><br><b> | ||
|
||
`kubectl get namespaces` | ||
</b></details> | ||
|
||
<details> | ||
<summary>How to create a deployment?</code></summary><br><b> | ||
|
||
``` | ||
cat << EOF | kubectl create -f - | ||
> apiVersion: v1 | ||
> kind: Pod | ||
> metadata: | ||
> name: nginx | ||
> spec: | ||
> containers: | ||
> - name: nginx | ||
> image: nginx | ||
> EOF | ||
``` | ||
</b></details> | ||
|
||
<details> | ||
<summary>How to print information on a specific pod?</code></summary><br><b> | ||
|
||
`kubectl describe pod pod_name` | ||
</b></details> | ||
|
||
<details> | ||
<summary>How to delete a pod?</code></summary><br><b> | ||
<summary>Deploy a pod called web-1985 using the nginx:alpine image</code></summary><br><b> | ||
|
||
`kubectl delete pod pod_name` | ||
</b></details> | ||
|
||
<details> | ||
<summary>How to check the status of all the components?</code></summary><br><b> | ||
`kubectl run web-1985 --image=nginx:alpine --restart=Never` | ||
</b></details> |