# Configuring AppArmor on Kubernetes Runner

**URL:** <https://drone.discourse.group/t/configuring-apparmor-on-kubernetes-runner/9283>\
**Category:** Drone Support\
**Created:** [June 14, 2021, 6:05am UTC](https://drone.discourse.group/t/configuring-apparmor-on-kubernetes-runner/9283 "2021-06-14T06:05:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dominic-p](https://yyz1.discourse-cdn.com/flex003/user_avatar/drone.discourse.group/dominic-p/32/3380_2.png) [@dominic-p](https://drone.discourse.group/u/dominic-p)\
**Post date:** [June 14, 2021, 6:05am UTC](https://drone.discourse.group/t/configuring-apparmor-on-kubernetes-runner/9283/1 "2021-06-14T06:05:57Z")

</div>

I’m pretty new to Drone. Could someone help me configure an AppArmor profile for a pipeline in the kubernetes runner?

I’m trying to build a container with buildah in my drone pipeline, and I think AppArmor is getting in the way. The solution seems to be to configure a custom AppArmor profile, but as far as I can tell, the only way to do that in k8s is with a [container level annotation](https://kubernetes.io/docs/tutorials/clusters/apparmor/). The problem here is that the container name created by the drone runner appears to be randomized, so I can’t figure out how to set `metadata.annotations` in my pipeline config to load the modified AppArmor profile.

Is there a workaround for this?

For background, see this [buildah issue](https://github.com/containers/buildah/issues/2899).
