on redeployment of airbyte the airbyte-admin servi...
# ask-ai
t
on redeployment of airbyte the airbyte-admin service role is being recreated, but the pods are not being restarted to use the new service account. what is the best way to fix this?
k
When Airbyte is redeployed and the airbyte-admin service account is deleted and recreated (as happens during some Helm upgrades), existing pods are not automatically restarted to pick up the new service account. This can lead to issues where pods continue running with the old (now deleted) service account, potentially causing permission errors or failures. Best way to fix this: 1. Manually Restart Pods: After the service account is recreated, you should manually restart the affected pods so they are recreated and pick up the new service account. This can be done with:
Copy code
kubectl rollout restart deployment <deployment-name> -n <namespace>
Or, for all deployments in the namespace:
Copy code
kubectl rollout restart deployment --all -n <namespace>
This ensures that all pods are recreated and use the current service account. 2. Prevent Helm from Managing the Service Account (Optional): If you want to avoid this issue in the future, you can configure Helm to not manage the service account and instead manage it externally. This prevents Helm upgrades from deleting and recreating the service account. Example configuration:
Copy code
yaml    global:      serviceAccountName: "airbyte-admin"     serviceAccount:      create: false      name: "airbyte-admin"
Then, create and manage the service account outside of Helm (e.g., with a separate manifest or via ArgoCD) [see example](https://github.com/airbytehq/airbyte/issues/18731). Summary: The immediate fix is to manually restart the pods after the service account is recreated. For a more robust solution, consider managing the service account outside of Helm to prevent it from being deleted and recreated during upgrades, which avoids the need for manual intervention in the future [see discussion and workaround](https://github.com/airbytehq/airbyte/issues/18731).
t
how can I force the airbyte pods to restart?
how can I Force the airbyte pods to restart? @kapa.ai
k
A message from kapa.ai
To force Airbyte pods to restart, you can use the following Kubernetes command to restart all deployments in the relevant namespace:
Copy code
kubectl rollout restart deployment --all -n <namespace>
Replace
<namespace>
with the namespace where Airbyte is deployed (for example,
airbyte
or
airbyte-v2
). This command will trigger a rolling restart of all deployments, causing the pods to be recreated and pick up any changes, such as a new or updated service account. This approach is referenced in Airbyte's documentation as the standard way to restart pods after making changes that require pods to be recreated, such as updating service account permissions or after an upgrade process [Upgrading Airbyte](https://docs.airbyte.com/platform/operator-guides/upgrading-airbyte). If you only want to restart a specific deployment, use:
Copy code
kubectl rollout restart deployment <deployment-name> -n <namespace>
This ensures that the pods are restarted and will use the latest configuration, including any changes to service accounts.