{"record":{"id":"ee5ef0fc26ddfe1c","repo":"cilium/cilium","slug":"deployment-s-is-rolling-out-d-out-of-d-pods-u","errorCode":null,"errorMessage":"deployment %s is rolling out - %d out of %d pods updated","messagePattern":"deployment (.+?) is rolling out - (.+?) out of (.+?) pods updated","errorType":"exception","errorClass":null,"httpStatus":null,"severity":"error","filePath":"cilium-cli/status/k8s.go","lineNumber":189,"sourceCode":"\tstatus.PodState[name] = stateCount\n\n\tnotReady := stateCount.Desired - stateCount.Ready\n\tif notReady > 0 {\n\t\tstatus.AddAggregatedError(name, name, fmt.Errorf(\"%d pods of Deployment %s are not ready\", notReady, name))\n\t}\n\n\tif unavailable := stateCount.Unavailable - notReady; unavailable > 0 {\n\t\tstatus.AddAggregatedWarning(name, name, fmt.Errorf(\"%d pods of Deployment %s are not available\", unavailable, name))\n\t}\n\n\t// ObservedGeneration behind: DeploymentController has not yet noticed the latest change\n\tif d.Generation != d.Status.ObservedGeneration {\n\t\tstatus.AddAggregatedError(name, name, fmt.Errorf(\"deployment %s is updated but rollout has not started\", name))\n\t}\n\n\t// Deployment change is not fully rolled out\n\tif d.Status.UpdatedReplicas < d.Status.Replicas {\n\t\tstatus.AddAggregatedError(name, name, fmt.Errorf(\"deployment %s is rolling out - %d out of %d pods updated\", name, d.Status.UpdatedReplicas, d.Status.Replicas))\n\t}\n\n\treturn false, nil\n}\n\nfunc (k *K8sStatusCollector) podCount(ctx context.Context, status *Status) error {\n\tvar numberAllPod, numberCiliumPod int\n\n\tpods, err := k.client.ListPods(ctx, \"\", metav1.ListOptions{})\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tif pods != nil && len(pods.Items) != 0 {\n\t\tfor _, pod := range pods.Items {\n\t\t\tif !pod.Spec.HostNetwork && (pod.Status.Phase == corev1.PodRunning || pod.Status.Phase == corev1.PodPending) {\n\t\t\t\tnumberAllPod++\n\t\t\t}","sourceCodeStart":171,"sourceCodeEnd":207,"githubUrl":"https://github.com/cilium/cilium/blob/ac7b90affa4baf0642e6685319d56907b3a73a6d/cilium-cli/status/k8s.go#L171-L207","documentation":"cilium-cli compares status.UpdatedReplicas with status.Replicas for each Deployment. When fewer pods than the total desired count run the new template, the deployment is mid-rollout and this aggregated error is recorded. It indicates a Cilium upgrade/config change is still propagating through the cluster.","triggerScenarios":"deploymentStatus found d.Status.UpdatedReplicas < d.Status.Replicas for the named Deployment, e.g. 1 of 3 pods updated after a `cilium upgrade`.","commonSituations":"Checking status during an in-progress `cilium upgrade` or `cilium config` change; a stuck rollout where one or more pods cannot schedule or pass readiness on the new version.","solutions":["Track rollout progress: `kubectl rollout status deployment/<name> -n <ns>` and wait for completion.","If stuck, inspect the new pods' events/logs (`kubectl describe pod`, `kubectl logs`) for image pull, scheduling, or crash-loop causes.","Roll back if the new version is broken: `kubectl rollout undo deployment/<name> -n <ns>`.","Re-run `cilium status` after the rollout completes."],"exampleFix":"// before: assuming failure mid-upgrade\ncilium status   # reports rolling out\n// after\nkubectl rollout status deployment/cilium -n kube-system\ncilium status","handlingStrategy":"retry","validationCode":"d, _ := clientset.AppsV1().Deployments(ns).Get(ctx, \"cilium\", metav1.GetOptions{})\nif d != nil && d.Status.UpdatedReplicas < d.Status.Replicas {\n    // rollout still in progress; wait\n}","typeGuard":null,"tryCatchPattern":"if err := status.Check(ctx); err != nil && strings.Contains(err.Error(), \"is rolling out\") {\n    _ = wait.PollUntilContextTimeout(ctx, 10*time.Second, 10*time.Minute, true,\n        func(ctx context.Context) (bool, error) { return rolloutComplete(ctx), nil })\n    err = status.Check(ctx)\n}","preventionTips":["Wait for `kubectl rollout status` completion after upgrades before status checks.","Schedule upgrades so rollouts finish before dependent automation runs.","Investigate stuck pods if the rollout doesn't converge in minutes."],"tags":["kubernetes","deployment","rollout","upgrade","cilium-cli"],"backgroundTag":"rollout-in-progress","analyzedSha":"ac7b90affa4baf0642e6685319d56907b3a73a6d","analyzedAt":"2026-08-31T18:27:15.868Z","schemaVersion":2},"datasetVersion":"2026-08-31T22:30:34.772Z"}