Deploy a pure ubi image as a container with Helm.
With the values.yaml in the Helm chart we can configure replica count
of the pods. The deployed containers are only a basic ubi operating system.
replicaCount: 2
oc login --token=YOUR_TOKEN --server=YOUR_MASTERNODE_SERVER
export PROJECT_NAME=ubi-helm
oc new-project $PROJECT_NAME
git clone https://github.com/thomassuedbroecker/ubi-helm.git
export CHART_NAME=ubi-helm
cd ./charts/$CHART_NAME
cat values.yaml
- Example output:
# Default values for chart.
# This is a YAML-formatted file.
# Declare variables to be passed into your templates.
replicaCount: 2
image:
repository: "ubi8/ubi"
tag: latest
helm dependency update .
helm install --dry-run --debug $CHART_NAME .
helm lint
Step 7: (optionl) Create a Helm package
helm package .
- Example output:
Successfully packaged chart and saved it to: /ubi-helm/charts/ubi-helm/ubi-helm-v1.0.0.tgz
helm install $CHART_NAME .
oc get pods
POD=$(oc get -n $PROJECT_NAME pods | grep $CHART_NAME | head -n 1 | awk '{print $1;}')
oc exec -n $PROJECT_NAME $POD --container $CHART_NAME -- ls
- Example output:
NAME READY STATUS RESTARTS AGE
ubi-helm-ubi-helm-74d44b5c77-tzbcb 1/1 Running 7 (22s ago) 10m
ubi-helm-ubi-helm-74d44b5c77-wljvr 1/1 Running 7 (27s ago) 10m
bin
boot
dev
etc
home
...
helm uninstall $CHART_NAME