Exercises
Exercise 1: Packaging a Chart as an OCI Image and Examining the Artifact
In this exercise, you will package a Helm chart and push it to an OCI registry, then use Docker to examine the resulting OCI artifact.
This demonstrates how Helm charts are stored as OCI artifacts and how you can inspect them using standard container tools.
Step 1: Create and Package a Chart
Create a new Helm chart for this exercise:
helm create oci-chart
Package the chart:
helm package ./oci-chart
This creates a oci-chart-0.1.0.tgz file (assuming version 0.1.0 in Chart.yaml).
Step 2: Push the Chart to an OCI Registry
Before pushing, ensure you are logged into your OCI registry.
If you are using a local registry or need to log in:
helm registry login <registry-url>
Push the packaged chart to an OCI registry:
helm push oci-chart-0.1.0.tgz oci://<registry-url>/charts
For example, if using a local registry:
helm push oci-chart-0.1.0.tgz oci://localhost:5000/charts
This uploads your chart as an OCI artifact to the registry.
Step 3: Examine the OCI Artifact with Docker
Use Docker to pull and examine the OCI artifact.
First, pull the artifact:
docker pull <registry-url>/charts/oci-chart:0.1.0
For a local registry example:
docker pull localhost:5000/charts/oci-chart:0.1.0
Step 4: Inspect the OCI Artifact
Examine the manifest of the OCI artifact:
docker manifest inspect <registry-url>/charts/oci-chart:0.1.0
This shows the OCI manifest structure, including:
* Media types
* Layers
* Annotations
* Configuration
Step 5: Inspect the Image Details
Get detailed information about the OCI artifact:
docker image inspect <registry-url>/charts/oci-chart:0.1.0
This provides comprehensive information about the artifact, including:
* Architecture
* Created timestamp
* Environment variables
* Labels and annotations
* Layer information
Step 6: View the Artifact Layers
Examine the layers that make up the OCI artifact:
docker history <registry-url>/charts/oci-chart:0.1.0
This shows the layer history, helping you understand how the chart is structured as an OCI artifact.
This exercise demonstrates that Helm charts stored as OCI artifacts can be examined using standard Docker commands, showing how Helm integrates with the OCI ecosystem.