Skip to content

Commit

Permalink
Updating README for information on OpenShift
Browse files Browse the repository at this point in the history
- Spellings and formatting from @imjasonh

Signed-off-by: Chmouel Boudjnah <[email protected]>
  • Loading branch information
chmouel committed Apr 26, 2021
1 parent 29cd8e0 commit d2fb66f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,26 @@ Yes! `ko resolve -f -` will read and process input from stdin, so you can have
kustomize build config | ko resolve -f -
```

## Does `ko` work with [OpenShift Internal Registry](https://docs.openshift.com/container-platform/4.7/registry/registry-options.html#registry-integrated-openshift-registry_registry-options)?

Yes! Follow these steps:

* Connect to your OpenShift installation: https://docs.openshift.com/container-platform/4.7/cli_reference/openshift_cli/getting-started-cli.html#cli-logging-in_cli-developer-commands
* Expose the OpenShift Internal Registry so you can push to it: https://docs.openshift.com/container-platform/4.7/registry/securing-exposing-registry.html
* Export your token to `$HOME/.docker/config.json`:

```sh
oc registry login --to=$HOME/.docker/config.json
```

* Create a namespace where you will push your images, i.e: `ko-images`
* Execute this command to set `KO_DOCKER_REPO` to publish images to the internal registry.

```sh
export KO_DOCKER_REPO=$(oc get route default-route -n openshift-image-registry --template='{{ .spec.host }}')/ko-images
```


# Acknowledgements

This work is based heavily on learnings from having built the
Expand Down

0 comments on commit d2fb66f

Please sign in to comment.