sp33dy
10/29/2025, 4:11 PMFailure executing: GET at: https://kubernetes-api:443/api/v1/namespaces/airbyte/pods?labelSelector=airbyte%3Djob-pod. Message: Unauthorized. Received status: Status(apiVersion=v1, code=401, details=null, kind=Status, message=Unauthorized, metadata=ListMeta(_continue=null, remainingItemCount=null, resourceVersion=null, selfLink=null, additionalProperties={}), reason=Unauthorized, status=Failure, additionalProperties={}).
but when I go to it's pod and execute connection manually:
curl https://kubernetes-api:443/api/v1/namespaces/airbyte/pods?labelSelector=airbyte%3Djob-pod --cacert /var/run/secrets/kubernetes.io/serviceaccount/ca.crt -H "Authorization: Bearer $(cat /var/run/secrets/kubernetes.io/serviceaccount/token)"
It works fine. What could be the problem?kapa.ai
10/29/2025, 4:12 PMFailure executing: GET at: https://kubernetes-api:443/api/v1/namespaces/airbyte/pods?labelSelector=airbyte%3Djob-pod. Message: Unauthorized. Received status: Status(apiVersion=v1, code=401, ...), reason=Unauthorized, status=Failure, ... indicates that the pod is not authorized to perform the requested action against the Kubernetes API. However, when you manually run the curl command inside the pod using the service account token, it works, which suggests that the service account attached to the pod has the necessary permissions, but the application inside the pod is not using the credentials correctly. Based on the knowledge sources, similar issues have occurred due to: 1. Service Account Misconfiguration or Mismatch: Airbyte workload pods sometimes do not get the correct service account attached, or the application defaults to a different service account (like airbyte-admin or default) instead of the one with the required permissions. This can happen due to hardcoded values or missing configuration in the Helm chart or environment variables. For example, in some versions, the service account was not correctly injected into workload pods, leading to authorization failures when accessing the Kubernetes API [[source]](https://github.com/airbytehq/airbyte/issues/50979). 2. RBAC Role/Binding Issues: If the service account does not have the correct Role or RoleBinding, the application will receive a 401 Unauthorized error, even if the token is present. Manual curl works because you are explicitly using the token, but the application may not be picking it up due to how it is launched or due to missing environment variables [[source]](https://github.com/airbytehq/airbyte/issues/42859). 3. Pod Restart/Upgrade Issues: Sometimes, after upgrading or changing service account settings, a full restart of the Airbyte pods (especially the workload-launcher and worker pods) is required for the changes to take effect [[source]](https://github.com/airbytehq/airbyte/issues/39512). What you should check: - Ensure that the airbyte-workload-launcher pod is running with the correct service account. You can check this with: kubectl get pod <workload-launcher-pod> -o yaml | grep serviceAccount The output should show your intended service account, not default or an unexpected value. - Make sure the service account has the necessary RBAC permissions (Role and RoleBinding) to list pods in the namespace. - If you recently changed the service account or upgraded Airbyte, try restarting the workload-launcher pod to ensure it picks up the new configuration. - Double-check your Helm values for service account configuration. For example, explicitly set: yaml global: jobs: kube: serviceAccountName: <your-service-account> as this has resolved similar issues for others [[source]](https://github.com/airbytehq/airbyte/issues/49938). If after these checks the issue persists, it may be related to a known bug in certain Airbyte versions where the service account is not correctly injected into workload pods. In that case, consider downgrading to a version where this is known to work, or monitor for upstream fixes [[source]](https://github.com/airbytehq/airbyte/issues/50979). Summary: The most likely cause is that the airbyte-workload-launcher pod is not using the correct service account or the service account does not have the required permissions. Manual curl works because you are explicitly using the token, but the application may not be. Double-check the service account assignment and RBAC, and restart the pod after making changes. If you need more specific troubleshooting steps, please provide the output of: kubectl get pod <workload-launcher-pod> -o yaml | grep serviceAccount and your relevant Helm values for service account configuration.sp33dy
10/29/2025, 4:23 PMkapa.ai
10/29/2025, 4:23 PMkapa.ai
10/29/2025, 4:23 PMjobs, pods, pods/log, pods/exec, pods/attach, and secrets [[Update service account for 1.6]](https://docs.airbyte.com/platform/enterprise-setup/upgrade-service-account). There is no mention in the official documentation or related GitHub issues that configmaps or endpoints are required resources for the service account to function correctly. If your curl command works from within the pod using the service account token, it suggests that the permissions currently granted are sufficient for the specific API call you tested (listing pods). The lack of configmaps and endpoints permissions should not affect the ability to list pods, which is the operation in your error message. However, if Airbyte or its workload pods require access to configmaps or endpoints for other operations, missing these permissions could cause issues elsewhere, but there is no evidence in the knowledge sources that these are required for the workload-launcher to function properly. Summary: According to the official Airbyte documentation and related issues, missing configmaps and endpoints permissions should not cause the specific authorization error you are seeing for listing pods. The required resources are limited to those listed above. If you encounter errors related to configmaps or endpoints in the future, you may need to revisit this, but for your current issue, these permissions are not indicated as necessary in the knowledge sources. If you need to ensure full compatibility, you should follow the documented permissions exactly as described in the upgrade and setup guides [[Update service account for 1.6]](https://docs.airbyte.com/platform/enterprise-setup/upgrade-service-account).sp33dy
10/29/2025, 4:26 PMkapa.ai
10/29/2025, 4:26 PMkapa.ai
10/29/2025, 4:26 PMairbyte-workload-launcher pod is running with the correct service account, - The service account has the documented required permissions (at least for pods, jobs, secrets, etc.), - Manual curl with the service account token works from inside the pod, but you are still seeing a 401 Unauthorized error from the workload-launcher, the knowledge sources suggest a few possible causes, but do not provide a definitive answer for this exact scenario. What the knowledge sources do confirm: - Similar issues have occurred when the service account was not correctly injected or used by the workload pods, sometimes due to hardcoded values or environment variable misconfigurations. However, you have confirmed the correct service account is set on the pod [[Workload pods missing service account](https://github.com/airbytehq/airbyte/issues/50979)]. - RBAC misconfiguration is a common cause, but you have checked and set the required permissions [[Unable to create pods after upgrade](https://github.com/airbytehq/airbyte/issues/42859)]. - Restarting the workload-launcher pod after changing service account or RBAC settings is necessary, but you have already done this [[platform WorkerException](https://github.com/airbytehq/airbyte/issues/39512)]. - There have been regressions in some Airbyte versions where the workload-launcher or spawned pods did not use the correct service account, but these typically resulted in a 403 Forbidden or a different error, not a 401 Unauthorized [[Workload pods missing service account](https://github.com/airbytehq/airbyte/issues/50979)]. What is not clear from the knowledge sources: - There is no explicit mention of a scenario where manual curl works but the workload-launcher receives a 401 Unauthorized, with all other settings correct. - There is no documentation or issue indicating that missing configmaps or endpoints permissions would cause this specific problem. Summary: I'm sorry, but the knowledge sources do not contain enough information to definitively diagnose why you are seeing a 401 Unauthorized from the workload-launcher when the service account and permissions appear correct and manual API calls succeed. This scenario is not explicitly covered in the available documentation or issues. If you have already verified all the above, you may be encountering a bug or an edge case not documented in the current knowledge sources. If possible, consider opening a GitHub issue with detailed logs and configuration, as this may help the Airbyte team or community identify a new or rare problem.sp33dy
10/29/2025, 5:06 PMkapa.ai
10/29/2025, 5:06 PMkapa.ai
10/29/2025, 5:06 PMsh kubectl get pod <workload-launcher-pod> -o yaml | grep serviceAccount You should see your custom service account name, not default or airbyte-admin (unless that's your intended account). Also, check that the /var/run/secrets/kubernetes.io/serviceaccount/token file exists and is mounted in the pod. 2. Compare Environment and File Access From within the workload-launcher pod, you can check if the application is using the correct token by comparing the token file contents with what is used in your successful curl command: sh kubectl exec -it <workload-launcher-pod> -- cat /var/run/secrets/kubernetes.io/serviceaccount/token Then, ensure that the application (Airbyte workload-launcher) is configured to use this token for Kubernetes API calls. 3. Check Application Logs for Token Usage Review the workload-launcher logs for any errors or warnings about authentication or token usage. If the application is not picking up the token, you may see errors related to missing or invalid credentials. 4. Check for Hardcoded or Overridden Kubeconfig Some issues in Airbyte have been caused by hardcoded service account names or misconfigured environment variables, causing the application to use the wrong credentials even when the pod is configured correctly [[Workload pods missing service account](https://github.com/airbytehq/airbyte/issues/50979)]. Summary: The main way to verify if the token is being picked up is to ensure the pod is running with the correct service account, the token file is present and readable, and the application is not overriding or ignoring this token. If all these are correct and the issue persists, it may be a bug or misconfiguration not covered in the current knowledge sources.sp33dy
10/29/2025, 5:20 PMsp33dy
10/29/2025, 5:23 PM