I'm trying to setup the [Azure Face recognition container](https://learn.microsoft.com/en-us/azure/cognitive-services/Face/face-resource-container-config), but wondering how to use a k8 secret as a Docker command "argument."

This works, but I need to replace the ApiKey with my k8 secret.

```
{
  "kind": "Deployment",
  "spec": {
    "template": {
      "spec": {
        "containers": [
          {
            "name": "azure-face",
            "args": [
              "Eula=accept",
              "Billing=https://microsoft.com",
              "ApiKey=123"
            ]
          }
        ]
      }
    }
  }
}

```

Create secret like this:

```
kubectl create secret generic azure-api-key --from-literal=azure-api-key="123"

```

Tried changing the container args like this but it doesn't work - arugment is not passed as expected:
(also tried other variations like ApiKey=${AZURE\_API\_KEY})

```
    "containers": [
      {
        "args": [
          "Eula=accept",
          "Billing=https://microsoft.com",
          "ApiKey=$AZURE_API_KEY"
        ],
        "env": [
          {
            "name": "AZURE_API_KEY",
            "valueFrom": {
              "secretKeyRef": {
                "name": "azure-api-key",
                "key": "azure-api-key"
              }
            }
          }
        ]
      }
    ]

```

Also did docker exec and from inside container verified that:

```
$ echo $AZURE_API_KEY
$ 123

```