Skip to content

Commit d3428e2

Browse files
bashlogsgitbook-bot
authored andcommitted
GITBOOK-15: No subject
1 parent 35c744e commit d3428e2

File tree

3 files changed

+43
-0
lines changed

3 files changed

+43
-0
lines changed

SUMMARY.md

+8
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,11 @@
3232
* [Build](practical-2/build.md)
3333
* [Temp Bookmarks](temp-bookmarks.md)
3434
* [NFS Server](nfs-server.md)
35+
36+
## Troubleshooting
37+
38+
* [Basic Troubleshooting](troubleshooting/basic-troubleshooting.md)
39+
40+
## Group 1
41+
42+
* [Other Things](group-1/other-things.md)

group-1/other-things.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Other Things
2+
3+
```
4+
kubectl create ns multitenant
5+
6+
kubectl get namespaces
7+
8+
kubectl -n multitenant create deployment mainapp --image=nginx
9+
10+
kubectl -n multitenant expose deployment mainapp --name=shopping --type=NodePort --port=80
11+
12+
kubectl exec -it secondapp -c busy -- sh
13+
```
+22
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Basic Troubleshooting
2+
3+
### Basic Troubleshooting Steps <a href="#basic-troubleshooting-steps" id="basic-troubleshooting-steps"></a>
4+
5+
The troubleshooting flow should start with the obvious. If there are errors from the command line, investigate them first. The symptoms of the issue will probably determine the next step to check. Working from the application running inside a container to the cluster as a whole may be a good idea. The application may have a shell you can use, for example:
6+
7+
```
8+
kubectl create deployment troubleshoot --image=nginx
9+
kubectl exec -ti troubleshoot- -- /bin/sh
10+
```
11+
12+
If the Pod is running, use **kubectl logs pod-name** to view the standard out of the container. Without logs, you may consider deploying a **sidecar** container in the Pod to generate and handle logging. The next place to check is networking, including DNS, firewalls and general connectivity, using standard Linux commands and tools.
13+
14+
### Troubleshooting Flow <a href="#troubleshooting-flow" id="troubleshooting-flow"></a>
15+
16+
1. Pods
17+
2. Network and Security
18+
3. Agents
19+
20+
#### Troubleshooting a Pod <a href="#troubleshooting-a-pod" id="troubleshooting-a-pod"></a>
21+
22+
To handle error in pod you have to run it and solve basic syntax, label and selector error

0 commit comments

Comments
 (0)