Create config map for all variables and secrets, update ingress-service.yaml to use config map, update yaml files to include persistent volume if recommended or necessary, update nginx-proxy-deployment to use latest nginx proxy manager and proxy for ghost-blog-deployment, add resource limits for nginx-proxy-deployment, add mysql-pv and mysql-pvc yaml files, and update yaml files to reference latest changes.

This commit is contained in:
gregory hendrickson
2023-01-26 03:28:27 -08:00
parent 250a82b87c
commit 91e99dd2ab
3 changed files with 24 additions and 2 deletions

2
.gitignore vendored
View File

@@ -14,4 +14,4 @@
.DS_Store
Thumbs.db
blog-config-map.yaml
*-config-map.yaml

View File

@@ -21,4 +21,21 @@ This configuration is using a Persistent Volume to store the Ghost blog data, th
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
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

View File

@@ -29,3 +29,8 @@ spec:
- hosts:
- $(VAR_HOST)
secretName: $(SECRET_NAME)
#In the ingress-service.yaml, the "secretName" field is used to specify the name of the Kubernetes Secret object that contains the TLS certificate and key that should be used for the ingress. The ingress controller will use this secret to terminate the HTTPS connection and encrypt the traffic. The value of the "secretName" field should be the name of the secret that contains the certificate and key.