imagePullSecret フィールドリファレンス
kubectl で imagePullSecret を作成する のフィールドリファレンスです。
kubectl create secret docker-registry のフラグ
| フラグ | デフォルト値 | 説明 |
|---|---|---|
NAME | — | Secret の名前。小文字のみ、- と . のみ使用可能。 |
--docker-server | https://index.docker.io/v1/ | registry のアドレス。 |
--docker-username | 空 | ログインに使うユーザー名。 |
--docker-password | 空 | パスワードまたはトークン。 |
--docker-email | 空 | 古い registry でのみ使用。省略可能。 |
--from-file | — | 上記 3 つのフラグの代わりに使う config.json のパス。 |
--namespace | default | Secret を作成する namespace。 |
--dry-run=client | — | Secret を作成せず、YAML を出力します。 |
--docker-server の一致ルール
値は、イメージ名の先頭にあるホスト部分と完全に一致させる必要があります。
| イメージ名 | 正しい値 |
|---|---|
registry.fptcloud.com/my-project/api:v1 | registry.fptcloud.com |
10.0.0.5:5000/api:v1 | 10.0.0.5:5000 |
nginx:1.25 | https://index.docker.io/v1/ |
Secret の命名規則
Secret の名前は DNS subdomain 形式に従います。小文字、数字、-、. のみを使用し、先頭と末尾は英数字にします。
| 有効な例 | 無効な例 |
|---|---|
regcred | RegCred(大文字を含む) |
fke-registry-cred | reg_cred(アンダースコアを含む) |
関連情報
- kubectl で imagePullSecret を作成する
- kubectl create secret docker-registry — Kubernetes 公式リファレンス。