windows容器的活力探测

windows容器的活力探测,windows,containers,Windows,Containers,我正在尝试为windows容器设置Liveity probe livenessProbe: httpGet: path: /api/health?format=json port: 85 host: localhost httpHeaders: - name: Authorization value: Bearer $(SITE_AUTH_TOK

我正在尝试为windows容器设置Liveity probe

      livenessProbe:
        httpGet:
          path: /api/health?format=json
          port: 85
          host: localhost
          httpHeaders:
          - name: Authorization
            value: Bearer $(SITE_AUTH_TOKEN)
        failureThreshold: 3
        periodSeconds: 60
        timeoutSeconds: 30
但是这不起作用。。所以我尝试了选项2

     livenessProbe:
        exec:
          command:
            - powershell.exe
            - '-command'
            - >-
              Invoke-WebRequest
              'http://localhost:85/api/health?_=$(SITE_AUTH_TOKEN)&format=json'
              -UseBasicParsing
        timeoutSeconds: 30
        periodSeconds: 60
        successThreshold: 1
        failureThreshold: 3
但是Option2无法读取环境变量值(Site Auth Token)并引发未经授权的错误。。 是否有人能够在Windows容器中成功实施自定义运行状况探测?谢谢你的帮助