Scenario 1: Helm

Deploy podinfo using its OCI-hosted Helm chart

Deploy podinfo using its OCI-hosted Helm chart. The equivalent plain Helm command would be:

helm upgrade -i podinfo oci://ghcr.io/stefanprodan/charts/podinfo

With component-operator, a Flux HelmRepository and HelmChart object serve the chart artifact, and a Component drives the deployment lifecycle.

1. Create the Flux source objects

# podinfo-helm-source.yaml
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmRepository
metadata:
  name: podinfo
  namespace: default
spec:
  type: oci
  url: oci://ghcr.io/stefanprodan/charts
  interval: 5m
---
apiVersion: source.toolkit.fluxcd.io/v1
kind: HelmChart
metadata:
  name: podinfo
  namespace: default
spec:
  chart: podinfo
  sourceRef:
    kind: HelmRepository
    name: podinfo
  interval: 5m
kubectl apply -f podinfo-helm-source.yaml

2. Create the Component

# podinfo-helm.yaml
---
apiVersion: core.cs.sap.com/v1alpha1
kind: Component
metadata:
  name: podinfo
  namespace: default
spec:
  sourceRef:
    fluxHelmChart:
      name: podinfo
  path: podinfo
kubectl apply -f podinfo-helm.yaml

3. Verify

kubectl get component podinfo
kubectl get pods -l app.kubernetes.io/name=podinfo

4. Cleanup

kubectl delete component podinfo
kubectl delete helmchart podinfo
kubectl delete helmrepository podinfo

Continue with Scenario 2: Kustomize to deploy the same application from a Git repository.