`kubectl apply` in the pipeline fails: `error: You must be logged in to the server (Unauthorized)`.
BeginnerTroubleshootingDeployment, Kubernetes and GitOps Failures
Answer
Likely causes → Expired token or kubeconfig, EKS token not refreshed, wrong context.
Diagnose → kubectl config current-context, aws eks get-token --cluster-name X, aws sts get-caller-identity.
Fix → Refresh credentials (aws eks update-kubeconfig), check the identity mapping (access entries or aws-auth).
Prevent → Use short-lived OIDC credentials created per job.
More on Deployment, Kubernetes and GitOps Failures
`kubectl rollout status` hangs: `Waiting for deployment "app" rollout to finish: 1 old replicas are pending termination...`AdvancedPods in `CrashLoopBackOff` right after deploy.Beginner`ImagePullBackOff` with `manifest for registry/app:1.4.2 not found`.BeginnerHelm: `Error: UPGRADE FAILED: another operation (install/upgrade/rollback) is in progress`.AdvancedHelm: `Error: rendered manifests contain a resource that already exists. Unable to continue with install`.IntermediateArgo CD app stuck `Progressing` forever.Intermediate