Sealer support to save raw helm chart package to cloud image as oci format. with this feature, we can pull the helm chart package in other offline production environment.
Prerequisites
Prepare two nodes named the build node and the run node. At the same time need to install sealer and helm on it.
Examples
On the build node.
Start docker registry to save helm chart package.
start docker registry to transfer helm chart package to oci format.
Then run sealer build -t my-kubernetes:v1.19.8 -f Kubefile .and we can use sealer save my-kubernetes:v1.19.8 -o my-kubernetes.tar to save the image to the local filesystem.
On the run node.
load the image my-kubernetes.tar from the build node use sealer load -i my-kubernetes.tar.
Use sealer run to start the cluster
1
sealer run -d my-kubernetes:v1.19.8 -p password -m 172.16.0.230
Pull Helm chart on the run node.
When the cluster is up, we can pull the helm chart package use helm pull:
Build CloudImage and save ACR remote chart to local registry
script
1
sealer build -t chart:latest .
Run a cluster
script
1
sealer run chart:latest -m x.x.x.x -p xxx
Try to pull chart using helm from local registry
script
1 2 3 4 5 6
[root@iZ2zeasfsez3jrior15rpbZ certs]# helm pull oci://sea.hub:5000/aliyun-inc.com/elasticsearch --version 1.0.1-elasticsearch.elasticsearch Warning: chart media type application/tar+gzip is deprecated Pulled: sea.hub:5000/aliyun-inc.com/elasticsearch:1.0.1-elasticsearch.elasticsearch Digest: sha256:c247fd56b985cfa4ad58c8697dc867a69ee1861a1a625b96a7b9d78ed5d9df95 [root@iZ2zeasfsez3jrior15rpbZ certs]# ls elasticsearch-1.0.1-elasticsearch.elasticsearch.tgz
If you got Error: failed to do request: Head "https://sea.hub:5000/v2/aliyun-inc.com/elasticsearch/manifests/1.0.1-elasticsearch.elasticsearch": x509: certificate signed by unknown authority error, trust registry cert on your host: