# K8s cloudquery sync empty context issue with service account setup

**URL:** <https://community.cloudquery.io/t/k8s-cloudquery-sync-empty-context-issue-with-service-account-setup/232>\
**Category:** CloudQuery Plugins\
**Created:** [April 30, 2024, 6:15am UTC](https://community.cloudquery.io/t/k8s-cloudquery-sync-empty-context-issue-with-service-account-setup/232 "2024-04-30T06:15:57Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![star-opossum](https://avatars.discourse-cdn.com/v4/letter/s/e9c0ed/32.png) [@star-opossum](https://community.cloudquery.io/u/star-opossum)\
**Post date:** [April 30, 2024, 6:15am UTC](https://community.cloudquery.io/t/k8s-cloudquery-sync-empty-context-issue-with-service-account-setup/232/1 "2024-04-30T06:15:57Z")

</div>

k8s CloudQuery sync is getting an empty context in sync data when using a service account (rbac.authorization), which is created using Helm. This context contains the cluster name. How can I get this data during sync?

Below is the k8s source YAML I’m using:

```yaml
kind: source
spec: 
  name: "k8s"
  path: "cloudquery/k8s"
  registry: "github"
  version: "v5.2.7"
  tables: ["*"]
  destinations: ["postgresql"]

```

---

<div class="post-metadata">

**Author:** ![herman](https://sea1.discourse-cdn.com/flex001/user_avatar/community.cloudquery.io/herman/32/27_2.png) [@herman](https://community.cloudquery.io/u/herman)\
**Post date:** [April 30, 2024, 10:14am UTC](https://community.cloudquery.io/t/k8s-cloudquery-sync-empty-context-issue-with-service-account-setup/232/2 "2024-04-30T10:14:54Z")

</div>

Hi @star-opossum,

I’m not sure off the top of my head. It seems specific to the use of a service account with RBAC authentication.

I don’t know your setup; how many clusters are you syncing data for? Could you use the sync source name field to store the cluster name? Or maybe as a label on the pods?

In any case, could you open an issue, preferably with all the steps needed to reproduce it, so we can have a look? [GitHub - CloudQuery Issues](https://github.com/cloudquery/cloudquery/issues/new/choose)
