update README.md

This commit is contained in:
gregory hendrickson
2023-01-26 03:32:33 -08:00
parent 91e99dd2ab
commit 50d59e5179

View File

@@ -5,14 +5,25 @@ Prerequisites
A running Kubernetes cluster
The kubectl command-line tool installed on your local machine
Deployment
To deploy the Ghost blog, run the following commands:
kubectl apply -f namespace.yaml
kubectl apply -f ghost-blog-deployment.yaml
kubectl apply -f ghost-blog-service.yaml
kubectl apply -f mysql-deployment.yaml
kubectl apply -f mysql-service.yaml
kubectl apply -f ingress-service.yaml
kubectl apply -f blog-config-map.yaml
kubectl apply -f deployments/ghost-blog-deployment.yaml
kubectl apply -f deployments/mysql-deployment.yaml
kubectl apply -f deployments/nginx-proxy-deployment.yaml
kubectl apply -f services/ghost-blog-service.yaml
kubectl apply -f services/ingress-service.yaml
kubectl apply -f services/mysql-service.yaml
kubectl apply -f services/nginx-proxy-service.yaml
kubectl apply -f volumes/nginx-pv.yaml
kubectl apply -f volumes/nginx-pvc.yaml
kubectl apply -f volumes/mysql-pv.yaml
kubectl apply -f volumes/mysql-pvc.yaml
kubectl apply -f volumes/blog-pv.yaml
kubectl apply -f volumes/blog-pvc.yaml
This will create the necessary resources in the cluster, including a deployment for the Ghost app, a service for connecting to the MySQL server, and an ingress service for routing traffic to the Ghost app via the nginx-proxy with https and http.
Volumes
@@ -22,20 +33,3 @@ ingress-service.yaml
In this example, $(VAR_HOST) and $(SECRET_NAME) are variables that are stored in a configMap and a Secret, respectively. These variables can be managed and updated separately from the YAML files, making it easier to update and maintain your configuration.
To use variables in your YAML files, you'll first need to create a configMap and a Secret that contains the variables you need. You can do this using the kubectl
kubectl apply -f nginx-pv.yaml
kubectl apply -f nginx-pvc.yaml
kubectl apply -f mysql-pv.yaml
kubectl apply -f mysql-pvc.yaml
kubectl apply -f blog-pv.yaml
kubectl apply -f blog-pvc.yaml
kubectl apply -f ghost-blog-deployment.yaml
kubectl apply -f mysql-deployment.yaml
kubectl apply -f nginx-proxy-deployment.yaml
kubectl apply -f ghost-blog-service.yaml
kubectl apply -f ingress-service.yaml
kubectl apply -f mysql-service.yaml
kubectl apply -f nginx-proxy-service.yaml
kubectl apply -f blog-config-map.yaml