# Create a secret for imagePullSecrets on K8S

**URL:** <https://community.doppler.com/t/create-a-secret-for-imagepullsecrets-on-k8s/1335>\
**Category:** Need Help\
**Created:** [September 17, 2023, 6:17pm UTC](https://community.doppler.com/t/create-a-secret-for-imagepullsecrets-on-k8s/1335 "2023-09-17T18:17:21Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![watsonian](https://sea2.discourse-cdn.com/flex016/user_avatar/community.doppler.com/watsonian/32/267_2.png) [@watsonian](https://community.doppler.com/u/watsonian)\
**Post date:** [September 19, 2023, 5:33pm UTC](https://community.doppler.com/t/create-a-secret-for-imagepullsecrets-on-k8s/1335/2 "2023-09-19T17:33:10Z")

</div>

Hi @dmcgeobroker!

Welcome to the Doppler Community!

If I’m following you right, you have a secret in Doppler that you want to be mapped into k8s with a different name (e.g., `DOCKERCONFIGJSON` to `.dockerconfigjson`). Is that right?

If so, then you should actually be able to do that using a newer feature we added to the operator:

> <https://github.com/DopplerHQ/kubernetes-operator/blob/main/docs/custom_types_and_processors.md>

The TL;DR is that you’d setup a processor like this:

```auto
apiVersion: secrets.doppler.com/v1alpha1
kind: DopplerSecret
metadata:
  name: prod-dockerhub
  namespace: doppler-operator-system
spec:
  tokenSecret:
    name: doppler-docker-secret
  managedSecret:
    name: regcred
    namespace: my-namespace
    type: kubernetes.io/dockerconfigjson
  processors:
    DOCKERCONFIGJSON:
      type: plain
      asName: .dockerconfigjson

```

This would result in a secret named `regcred` with one entry named `.dockerconfigjson` with the contents you expect. Give it a shot and let me know if that’ll accomplish what you’re after!

Regards,  
-Joel

---

_[View the full topic](https://community.doppler.com/t/create-a-secret-for-imagepullsecrets-on-k8s/1335)._
