# Kubernetes container agent self-hosted crash and restart

**URL:** <https://discuss.circleci.com/t/kubernetes-container-agent-self-hosted-crash-and-restart/45504>\
**Category:** Bug Reports\
**Tags:** docker, circle-yml\
**Created:** [September 22, 2022, 4:12am UTC](https://discuss.circleci.com/t/kubernetes-container-agent-self-hosted-crash-and-restart/45504 "2022-09-22T04:12:45Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![phuthinh2202](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/phuthinh2202/32/31141_2.png) [@phuthinh2202](https://discuss.circleci.com/u/phuthinh2202)\
**Post date:** [September 22, 2022, 4:12am UTC](https://discuss.circleci.com/t/kubernetes-container-agent-self-hosted-crash-and-restart/45504/1 "2022-09-22T04:12:45Z")

</div>

I setup done with kubernetes self-hosted runner and it run on my EKS - Kubernetes service of AWS. But when i trigger my job and runner pod is crash with content:

```auto
panic: assignment to entry in nil map

goroutine 34 [running]:
github.com/circleci/container-agent/driver/k8s.(*k8sTask).createPod(0xc000246dc0, {0x20cf710, 0xc000978900}, {0xc000870420, 0x1, 0x1})
	/home/circleci/project/driver/k8s/task.go:259 +0x2a7
github.com/circleci/container-agent/driver/k8s.(*k8sTask).Start(0xc000246dc0, {0x20cf710?, 0xc000978900}, {0x7f9f5ee59098?, 0xc00095cf60}, {0xc000a32fc0?})
	/home/circleci/project/driver/k8s/task.go:154 +0x29e
github.com/circleci/container-agent/service.(*taskWorker).serviceWork(0xc0007eb860, {0x20cf668?, 0xc00021a300?}, {0xc000a32fc0?, {0xc00027c580?, 0x1?}})
	/home/circleci/project/service/task_worker.go:110 +0x4c3
github.com/circleci/container-agent/service.(*taskWorker).work(0xc0007eb860, {0x20cf668, 0xc00021a300})
	/home/circleci/project/service/task_worker.go:74 +0x5e
github.com/circleci/container-agent/service.Add.func2({0x20cf668?, 0xc00021a300?})
	/home/circleci/project/service/task_worker.go:62 +0x30
github.com/circleci/ex/system.(*System).Run.func2()
	/home/circleci/go/pkg/mod/github.com/circleci/ex@v1.0.4050-48c5602/system/system.go:63 +0x25
golang.org/x/sync/errgroup.(*Group).Go.func1()
	/home/circleci/go/pkg/mod/golang.org/x/sync@v0.0.0-20220819030929-7fc1605a5dde/errgroup/errgroup.go:75 +0x64
created by golang.org/x/sync/errgroup.(*Group).Go
	/home/circleci/go/pkg/mod/golang.org/x/sync@v0.0.0-20220819030929-7fc1605a5dde/errgroup/errgroup.go:72 +0xa5

```

Anyone can help, pls?  
Thanks

---

<div class="post-metadata">

**Author:** ![sebastian-lerner](https://sea2.discourse-cdn.com/circleci/user_avatar/discuss.circleci.com/sebastian-lerner/32/27833_2.png) [@sebastian-lerner](https://discuss.circleci.com/u/sebastian-lerner)\
**Post date:** [September 22, 2022, 12:10pm UTC](https://discuss.circleci.com/t/kubernetes-container-agent-self-hosted-crash-and-restart/45504/2 "2022-09-22T12:10:02Z")

</div>

> [@phuthinh2202](#):
>
> ```auto
> panic: assignment to entry in nil map
> 
> ```

Can you share the version of container agent you are using? It should be available in the “Self-hosted Runners” inventory in the UI or if there is a build link, in the “Task Lifecycle” step output.

The first step to diagnose would be to try to upgrade the helm chart and see if this issue still occurs with the latest version. [https://circleci.com/docs/runner-faqs#updates-to-container-agent-functionality](https://circleci.com/docs/runner-faqs#updates-to-container-agent-functionality)
