#!/bin/bash set -e echo "==> Creating Namespace..." kubectl apply -f namespace.yaml echo "==> Creating PersistentVolume, PersistentVolumeClaim and StatefulSet (PostgreSQL)..." kubectl apply -f statefulset.yaml echo "==> Waiting for PostgreSQL to be ready..." kubectl rollout status statefulset/postgres -n notes-app --timeout=120s echo "==> Creating Deployment (Notes web app)..." kubectl apply -f deployment.yaml echo "==> Creating Services..." kubectl apply -f service.yaml echo "==> Waiting for web app to be ready..." kubectl rollout status deployment/notes-web -n notes-app --timeout=120s echo "" echo "Application is running." echo "Run ./show-url.sh or see README.md for how to open the app in your browser."