Kubernetes imagePullSecrets 不起作用;拒绝拉取访问

问题描述

我为客户端和服务器版本使用 kubectl 1.18.1。我在 StatefulSet 清单中指定了 imagePullSecrets 并创建了一个包含以下内容docker-registry 机密:

{
    "auths": {
       "registryserver.com": {
           "username": "foo","password": "password","auth": "base64string"
       }
    }
}

但是,pod 仍然无法从注册表中拉取镜像。任何建议和见解表示赞赏。

解决方法

您可以将以下内容与 Helm 模板结合使用:

文件名:_imagepullsecret_helper.tpl

# start excel
$excel = New-Object -comobject Excel.Application

# get files
$files = Get-ChildItem 'C:\Users\ME\Desktop\TEST'

# loop through all files in the directory
ForEach ($file in $files){

    # open the file
    $workbook = $excel.Workbooks.Open($file.FullName)

    # make file visible
    $excel.Visible = $true

    # run macro
    $app = $excel.Application
    $app.run("PERSONAL.xlsb!Module6.MyMacro")
}