devops-exercises/certificates/cka.md

55 lines
1.0 KiB
Markdown
Raw Normal View History

2020-05-09 15:40:51 +02:00
## 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>
2020-06-15 08:41:32 +02:00
<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>
`kubectl delete pod pod_name`
</b></details>
<details>
<summary>How to check the status of all the components?</code></summary><br><b>
</b></details>