Answer: Kubernetes Pod stuck in CrashLoopBackOff
Roy
Posted on September 28, 2021
I faced similar issue. Just verify if your container is able to run continuously. You have to run the process in foreground to keep container running.
我在试图在 k8s 中运行 ubuntu pod 时,也遇到这个问题,添加 command, 使用 sleep 代替 image 中的缺省设置 bash 就好了
apiVersion: apps/v1
kind: Deployment
metadata:
creationTimestamp: null
labels:
app: ubuntu
name: ubuntu
spec:
replicas: 1
selector:
matchLabels:
app: ubuntu
strategy: {}
template:
metadata:
creationTimestamp: null
labels:
app: ubuntu
spec:
containers:
- image: ubuntu
name: ubuntu
command:
- sleep
args:
- infinity
resources: {}
status: {}
💖 💪 🙅 🚩
Roy
Posted on September 28, 2021
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.
Related
aws Mastering AWS Microservices Architecture for High-Traffic Systems: Interview Preparation
November 29, 2024
kubernetes Taming the Wild West of Research Computing: How Policies Saved Us a Thousand Headaches
November 29, 2024