How to use helm charts without internet access

5/15/2018

All of us know that helm charts are amazing and make our lives easier.

However, I got a use case when I would like to use helm charts - WITHOUT INTERNET ACCESS

And there are two steps:

  • Downloading chart from Git
  • Pulling Docker images from Dockerhub (spefified in values.yaml files)

How can I do this?

-- user2156115
charts
deployment
docker
kubernetes-helm

2 Answers

5/3/2020

Using a helm chart offline involves pulling the chart from the internet then installing it.:

$ helm pull <chart name>
$ ls #The chart will be pulled as a tar to the local directory
$ helm install <whatever release name you want>  <chart name>.tgz

For this method to work you'll need all the docker images the chart uses locally as you mentioned.

-- mikeLundquist
Source: StackOverflow

5/15/2018

I know the answer to the first part of my question.

you can actually git clone https://github.com/kubernetes/charts.git all offical charts from github and specify path to a chart (folder) on your filesystem you want to install.

This will be in form of helmfile

execute the command like this:

helmfile -f deployment.yaml sync

cat deployment.yaml
...
repositories:
  - name: roboll
    url: http://roboll.io/charts

context: example.int.com                # kube-context (--kube-context)

releases:

  # Prometheus deployment
  - name: my_prometheus              # name of this release
    namespace: monitoring                       # target namespace
    chart: /opt/heml/charts/stable/prometheus                    # the chart being installed to create this release, referenced by `repository/chart` syntax
    values: ["values/values_prometheus_ns_monitoring.yaml"]
    set:                                        # values (--set)
      - name: rbac.create
        value: true
  # Grafana deployment
  - name: my_grafana              # name of this release
    namespace: monitoring                       # target namespace
    chart: /opt/heml/charts/stable/grafana
    values: ["values/values_grafana_ns_monitoring.yaml"]

So as you can see I have specified some custom values_<software>_ns_monitoring.yaml files.

The second part of my original question is still unanswered.

I want to be able to tell docker to use a local docker image in this section

cat values_grafana_ns_monitoring.yaml

replicas: 1

image:
  repository: grafana/grafana
  tag: 5.0.4
  pullPolicy: IfNotPresent

I have managed to manually copy/paste - then load docker image so it is visible in my computer - but I can't figure out how to convince docker + helmfile to use my image. The goal is to process totally offlilne installation.

ANY IDEAS ???

 sudo docker images
[sudo] password for jantoth:
REPOSITORY                                                       TAG                 IMAGE ID            CREATED             SIZE
my_made_up_string/custom_grafana/custom_grafana                               5.1.2               917f46a60761        6 days ago          238 MB
-- user2156115
Source: StackOverflow