Installing Knative without internet

279 views Asked by At

Is it possible to install Knative without internet? Understand that it required K8 to pull images from internet during installation. Can I download all the necessary images to a private repository and apply yaml to do installation?

3

There are 3 answers

3
Antoine Cotten On BEST ANSWER

If you can pre-pull all images used in the Knative core, then the answer is yes: you can install and run Knative offline.

It's quite a few images, but you should be able to find all of them easily by inspecting the installation manifests from the YAML-based installation section of the Knative documentation.

Here are a few examples of images that compose the Knative core (as of Knative v0.22):

Serving

Eventing

Note: although the image attributes I referenced above are in the format ko://..., the release manifests documented in the YAML-based installation section of the Knative documentation contain actual image URLs.

1
markusthoemmes On

Yes, that should absolutely be possible. Assuming Knative Serving for now, you'd fetch the release YAML from https://knative.dev/docs/install/install-serving-with-yaml. You'll need 3 YAML files:

  1. serving-crds.yaml
  2. serving-core.yaml
  3. $network-plugin-of-your-choice.yaml

You can find all necessary images in the respective Deployments in those YAMLs. One notable exception is the queue-proxy image, which you'll find in the config-deployment ConfigMap.

Make sure to prepull all those images and replace the coordinates in the YAML with the coordinates of your private registry. Also make sure to grant the necessary pull-rights to the service accounts used.

0
Derek Williams On

I assume you’re likely doing government work or something similar if you’re asking this question. You’re asking us to provide actual code on what to do. Here’s the thing. You will have to docker save all the images. You’ll find these by searching each of the kubernetes manifests. Each container image will be prefixed in the yaml with image:. Then you can tar everything up and take it where you need. you are embarking on a very long and annoying task.