Skip to content

paul-gilber/demoapp-helm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

demoapp-helm-charts

Helm Charts for deploying demoapp to Kubernetes and OpenShift

Deployment to Kubernetes

Prerequisites:

  1. Kubernetes Cluster

Steps:

  1. Install NGINX Ingress Controller
# Pull Helm Chart
helm pull oci://ghcr.io/nginxinc/charts/nginx-ingress --untar
cd nginx-ingress

# Apply CRDs
kubectl apply -f crds/

# Create `nginx-ingress` namespace
kubectl create ns nginx-ingress

# Set current namespace to `nginx-ingress`
kubectl config set-context `kubectl config current-context` --namespace nginx-ingress
kubectl config get-contexts

# Install Helm Chart
helm install nginx-ingress . -n nginx-ingress

# Check pods
watch oc get pods

# Get `nginx` Ingress Class
oc get ingressclass nginx

# Go back to previous working directory
cd -
  1. Create demo namespace
# Create `demo` namespace
kubectl create ns demo

# Set current namespace to `demo`
kubectl config set-context `kubectl config current-context` --namespace demo
kubectl config get-contexts
  1. Create demoapp nginx master ingress
kubectl apply -f deploy/demoapp-nginx-master.yaml -n demo
  1. Deploy demoapp-backend
cd charts/demoapp-backend
helm dependency update .
helm upgrade -i demoapp-backend . \
  -n demo \
  --values values-docker-desktop.yaml
cd -
  1. Deploy demoapp-frontend
cd charts/demoapp-frontend
helm dependency update .
helm upgrade -i demoapp-frontend . \
  -n demo \
  --values values-docker-desktop.yaml
cd -

Deployment to OpenShift Local

Prerequisites:

  1. Red Hat OpenShift Local

Steps:

  1. Create demo project
# Login to OpenShift Local
oc login -u kubeadmin https://api.crc.testing:6443

# Create project
oc new-project demo
  1. Deploy demoapp-backend
cd charts/demoapp-backend
helm dependency update .
helm upgrade -i demoapp-backend . \
  --values values-openshift-local.yaml
  1. Deploy demoapp-frontend
cd charts/demoapp-frontend
helm dependency update .
helm upgrade -i demoapp-frontend . \
  --values values-openshift-local.yaml