We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
I set up a docker secret using :
resource "kubernetes_secret" "docker" { metadata { name = "docker-cfg" } data { ".dockercfg" = "${file("/Users/odedpriva/.docker/config.json")}" } type = "kubernetes.io/dockercfg" }
trying to use it in pod resource returns an ErrImagePull error
ErrImagePull
resource "kubernetes_pod" "debug2" { count = "${var.services["debug"] ? 1 : 0}" metadata { name = "debug2" labels = { service = "debug" } } spec { image_pull_secrets = { name = "docker-cfg" } container { name = "net-tools" image = "${var.debug["net-tools-image"]}:${var.debug["net-tools-tag"]}" } } }
when creating this secret manually using k8s api
kubectl create secret docker-registry regsecret --docker-server=index.docker.io --docker-username=*** --docker-password=*** --docker-email=***@****
and referencing this secret in pod resource worked like a charm.
What am I doing wrong ?
local git:(master) ✗ ter version Terraform v0.10.7
The text was updated successfully, but these errors were encountered:
@radeksimko please try: type = "kubernetes.io/dockerconfigjson" instead of type = "kubernetes.io/dockercfg"
type = "kubernetes.io/dockerconfigjson"
type = "kubernetes.io/dockercfg"
Terraform's documentation seems to be wrong, but please have a look at Kubernetes' documentation.
Sorry, something went wrong.
Modify secret example per k8s docs
ce3c515
See https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod Fixes #79
8bc7268
81b92a8
See https://kubernetes.io/docs/concepts/containers/images/#specifying-imagepullsecrets-on-a-pod Fixes hashicorp#79
Successfully merging a pull request may close this issue.
I set up a docker secret using :
trying to use it in pod resource returns an
ErrImagePull
errorwhen creating this secret manually using k8s api
and referencing this secret in pod resource worked like a charm.
What am I doing wrong ?
The text was updated successfully, but these errors were encountered: