Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Dashboard pod status not reported correctly for pods using native sidecar containers #9299

Open
brentmjohnson opened this issue Jul 26, 2024 · 1 comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.

Comments

@brentmjohnson
Copy link

What happened?

Pod status in the dashboard showing "Init: x/y" instead of "Running":

image
image

Correct pod status shown in kubectl cli:

image

What did you expect to happen?

Pod status should show "Running" if all containers (including native sidecar containers) are ready.

How can we reproduce it (as minimally and precisely as possible)?

  1. Use the example here: https://kubernetes.io/docs/concepts/workloads/pods/sidecar-containers/#sidecar-example
  2. Observe the "Init: x/y" status in the dashboard
  3. Replace the deployment definition with the below - converting to a standard init container
  4. Observe the "Running" status in the dashboard
apiVersion: apps/v1
kind: Deployment
metadata:
  namespace: kube-system
  name: myapp
  labels:
    app: myapp
spec:
  replicas: 1
  selector:
    matchLabels:
      app: myapp
  template:
    metadata:
      labels:
        app: myapp
    spec:
      containers:
        - name: myapp
          image: alpine:latest
          command: ['sh', '-c', 'while true; do echo "logging" >> /opt/logs.txt; sleep 1; done']
          volumeMounts:
            - name: data
              mountPath: /opt
      initContainers:
        - name: logshipper
          image: alpine:latest
          # restartPolicy: Always
          # command: ['sh', '-c', 'tail -F /opt/logs.txt']
          command: ['sh', '-c', 'sleep 1']
          volumeMounts:
            - name: data
              mountPath: /opt
      volumes:
        - name: data
          emptyDir: {}

Anything else we need to know?

No response

What browsers are you seeing the problem on?

Microsoft Edge

Kubernetes Dashboard version

helm.sh/chart: kubernetes-dashboard-7.5.0

Kubernetes version

Client Version: v1.29.4 Kustomize Version: v5.0.4-0.20230601165947-6ce0bf390ce3 Server Version: v1.29.3

Dev environment

No response

@brentmjohnson brentmjohnson added the kind/bug Categorizes issue or PR as related to a bug. label Jul 26, 2024
@floreks
Copy link
Member

floreks commented Jul 26, 2024

Thanks for the detailed report and YAML to reproduce. It will be easier to fix. We will take care of that soon.

@floreks floreks added the priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release. label Jul 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug. priority/important-soon Must be staffed and worked on either currently, or very soon, ideally in time for the next release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants