Deploy stage: `error: You must be logged in to the server (Unauthorized)` from `kubectl`
BeginnerTroubleshootingIntegration failures: SonarQube, Nexus, Docker, Trivy, kubectl
Answer
Likely causes → Expired token in the kubeconfig credential, wrong kubeconfig, or (on EKS) the IAM identity is not mapped in access entries/aws-auth.
Diagnose → kubectl config view --minify, kubectl auth whoami (1.28+), aws sts get-caller-identity for EKS.
Fix → Refresh the credential; for EKS add an access entry for the role; prefer in-cluster service accounts for deploy pods.
Prevent → Avoid static kubeconfigs; use service accounts or workload identity.
More on Integration failures: SonarQube, Nexus, Docker, Trivy, kubectl
`java.lang.IllegalStateException: Unable to get SonarQube task id and/or server name. Please use the 'withSonarQubeEnv' wrapper to run your analysis.`Intermediate`waitForQualityGate` fails with `Timeout has been exceeded` though SonarQube shows the analysis as completeIntermediateSonar scanner: `ERROR: Not authorized. Analyzing this project requires authentication. Please check the user token in the property 'sonar.token' or the environment variable 'SONAR_TOKEN'.`BeginnerMaven deploy to Nexus: `Failed to deploy artifacts: Could not transfer artifact com.shack:app:jar:1.4.0 from/to maven-releases: status code: 400, reason phrase: Repository does not allow updating assets: maven-releases (400)`BeginnerNexus returns `status code: 401, reason phrase: Unauthorized (401)` during `mvn deploy`Beginner`docker: Cannot connect to the Docker daemon at unix:///var/run/docker.sock. Is the docker daemon running?` inside a Kubernetes agent podBeginner