# k8s创建容器报错CrashLoopBackOff

```
 kubectl delete -f sc.yaml
```

1、查看指定pod的日志

```
kubectl logs <pod_name>

kubectl logs -f <pod_name> #类似tail -f的方式查看(tail -f 实时查看日志文件 tail -f 日志文件log)
```

2、查看指定pod中指定容器的日志

```
kubectl logs <pod_name> -c <container_name>
```

PS：查看Docker容器日志

```
docker logs <container_id>
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://qiangrens-organization.gitbook.io/qkd90/rong-qi-hua-ji-shu/k8s-yun-yuan-sheng-shi-zhan/k8s-chuang-jian-rong-qi-bao-cuo-crashloopbackoff.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
