diff options
Diffstat (limited to 'gemfeed/DRAFT-kubernetes-with-freebsd-part-7.md')
| -rw-r--r-- | gemfeed/DRAFT-kubernetes-with-freebsd-part-7.md | 23 |
1 files changed, 18 insertions, 5 deletions
diff --git a/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.md b/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.md index e9a7190b..c7d56d8f 100644 --- a/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.md +++ b/gemfeed/DRAFT-kubernetes-with-freebsd-part-7.md @@ -324,7 +324,7 @@ metadata: name: apache-deployment namespace: test spec: - replicas: 1 + replicas: 2 selector: matchLabels: app: apache @@ -339,6 +339,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/ @@ -446,17 +458,18 @@ And let's apply the manifests: ```sh > ~ 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): ```sh > ~ 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: |
