From 580f83197159619428951f8faeaf7f3f2af9d8a7 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Mon, 28 Jul 2025 15:32:27 +0300 Subject: Update content for html --- gemfeed/DRAFT-kubernetes-with-freebsd-part-7.html | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) (limited to 'gemfeed') diff --git a/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.html b/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.html index 9fa4043f..79b35bb2 100644 --- a/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.html +++ b/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.html @@ -375,7 +375,7 @@ metadata: name: apache-deployment namespace: test spec: - replicas: 1 + replicas: 2 selector: matchLabels: app: apache @@ -390,6 +390,18 @@ spec: ports: # Container port where Apache listens - containerPort: 80 + readinessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 5 + periodSeconds: 10 + livenessProbe: + httpGet: + path: / + port: 80 + initialDelaySeconds: 15 + periodSeconds: 10 volumeMounts: - name: apache-htdocs mountPath: /usr/local/apache2/htdocs/ @@ -500,12 +512,12 @@ by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite -->
> ~ kubectl apply -f apache-persistent-volume.yaml
-> ~ kubectl apply -f apache-service.yaml
-> ~ kubectl apply -f apache-deployment.yaml
-> ~ kubectl apply -f apache-ingress.yaml
+    kubectl apply -f apache-service.yaml
+    kubectl apply -f apache-deployment.yaml
+    kubectl apply -f apache-ingress.yaml
 

-So looking at the deployment, it failed now, as the directory doesn't exist yet on the NFS share:
+So looking at the deployment, it failed now, as the directory doesn't exist yet on the NFS share (note, we also increased the replica count to 2, so in case one node goes down, that there is already a replica running on another node for faster failover):

> ~ kubectl get pods
 NAME                                 READY   STATUS              RESTARTS   AGE
 apache-deployment-5b96bd6b6b-fv2jx   0/1     ContainerCreating   0          9m15s
+apache-deployment-5b96bd6b6b-ax2ji   0/1     ContainerCreating   0          9m15s
 
 > ~ kubectl describe pod apache-deployment-5b96bd6b6b-fv2jx | tail -n 5
 Events:
-- 
cgit v1.2.3