<p>I have this BUILD file:</p>

<pre><code>package(default_visibility = ["//visibility:public"])

load("@npm_bazel_typescript//:index.bzl", "ts_library")
ts_library(
    name = "lib",
    srcs = glob(
        include = ["**/*.ts"],
        exclude = ["**/*.spec.ts"]
    ),
    deps = [
        "//packages/enums/src:lib",
        "//packages/hello/src:lib",
        "@npm//faker",
        "@npm//@types/faker",
        "@npm//express",
        "@npm//@types/express",
    ],
)

load("@io_bazel_rules_docker//nodejs:image.bzl", "nodejs_image")
nodejs_image(
    name = "server",
    data = [":lib"],
    entry_point = ":index.ts",
)

load("@io_bazel_rules_docker//container:container.bzl", "container_push")
container_push(
   name = "push_server",
   image = ":server",
   format = "Docker",
   registry = "gcr.io",
   repository = "learning-bazel-monorepo/server",
   tag = "dev",
)

load("@io_bazel_rules_k8s//k8s:object.bzl", "k8s_object")
k8s_object(
  name = "k8s_deploy",
  kind = "deployment",
  namespace = "default",
  template = ":server.yaml",
  images = {
    "deploy_server:do_not_delete": ":server"
  },
)
</code></pre>

<p>But when running the <code>k8s_deploy</code> rule I get this error:</p>

<pre><code>INFO: Analyzed target //services/server/src:k8s_deploy (1 packages loaded, 7 targets configured).
INFO: Found 1 target...
Target //services/server/src:k8s_deploy up-to-date:
  bazel-bin/services/server/src/k8s_deploy.substituted.yaml
  bazel-bin/services/server/src/k8s_deploy
INFO: Elapsed time: 0.276s, Critical Path: 0.01s
INFO: 0 processes.
INFO: Build completed successfully, 1 total action
INFO: Build completed successfully, 1 total action
2019/12/22 07:45:14 Unable to publish images: unable to publish image deploy_server:do_not_delete
</code></pre>

<p>The <code>lib</code>, <code>server</code> and <code>push_server</code> rules work fine. So I don't know what's the issue as there is no specific error message.</p>

<p>A snippet out of my <code>server.yaml</code> file:</p>

<pre><code>spec:
  containers:
    - name: server
      image: deploy_server:do_not_delete
</code></pre>

<p>You can try it yourself by running <code>bazel run //services/server/src:k8s_deploy</code> on this repo: <a href="https://github.com/flolude/minimal-bazel-monorepo/tree/de898eb1bb4edf0e0b1b99c290ff7ab57db81988" rel="noreferrer">https://github.com/flolude/minimal-bazel-monorepo/tree/de898eb1bb4edf0e0b1b99c290ff7ab57db81988</a></p>

Florian Ludewig
<p>Have you pushed images using this syntax before?  </p>

<p>I'm used to using the full repository tag for both the server.yaml and the k8s_object images.  </p>

<p>So, instead of just "<code>deploy_server:do_not_delete</code>", try "<code>gcr.io/learning-bazel-monorepo/deploy_server:do_not_delete</code>".</p>
