39 lines
1000 B
Markdown
39 lines
1000 B
Markdown
[KUBE](../README.md) / Log
|
|
|
|
# Log
|
|
|
|
> Opening the logs in the pods.
|
|
|
|
## Commands
|
|
|
|
### `--log`
|
|
|
|
> [!NOTE]
|
|
> Standard kubectl parameters for logs can be added, for example:
|
|
> `-f`: logs should be streamed<br>
|
|
> `--previous`: print the logs for the previous instance of the container in a pod if it exists.
|
|
|
|
Example:
|
|
```bash
|
|
sudo kube.sh --log
|
|
sudo kube.sh --log -f --tail=30
|
|
```
|
|
|
|
Examples of responses:
|
|
```bash
|
|
🔹Log
|
|
1: mariadb-master-0 [Running]
|
|
2: mariadb-slave-0 [Running]
|
|
3: openlitespeed-0 [Running]
|
|
4: openlitespeed-1 [Running]
|
|
5: postfix-78c47b95f6-42jcq [Running]
|
|
6: redis-0 [Running]
|
|
7: redis-1 [Running]
|
|
8: redis-2 [Running]
|
|
9: redis-sentinel-0 [Running]
|
|
10: redis-sentinel-1 [Running]
|
|
11: redis-sentinel-2 [Running]
|
|
12: worker-6cd4bdb6b8-c6f5d [Running]
|
|
Specify the pod number [0]:
|
|
```
|