diff options
Diffstat (limited to 'gemfeed')
| -rw-r--r-- | gemfeed/DRAFT-kubernetes-with-freebsd-part-7.html | 23 |
1 files changed, 18 insertions, 5 deletions
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: <b><u><font color="#000000">test</font></u></b> spec: - replicas: <font color="#000000">1</font> + replicas: <font color="#000000">2</font> selector: matchLabels: app: apache @@ -390,6 +390,18 @@ spec: ports: <i><font color="silver"># Container port where Apache listens</font></i> - containerPort: <font color="#000000">80</font> + readinessProbe: + httpGet: + path: / + port: <font color="#000000">80</font> + initialDelaySeconds: <font color="#000000">5</font> + periodSeconds: <font color="#000000">10</font> + livenessProbe: + httpGet: + path: / + port: <font color="#000000">80</font> + initialDelaySeconds: <font color="#000000">15</font> + periodSeconds: <font color="#000000">10</font> volumeMounts: - name: apache-htdocs mountPath: /usr/local/apache<font color="#000000">2</font>/htdocs/ @@ -500,12 +512,12 @@ by Lorenzo Bettini http://www.lorenzobettini.it http://www.gnu.org/software/src-highlite --> <pre>> ~ 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 </pre> <br /> -<span>So looking at the deployment, it failed now, as the directory doesn't exist yet on the NFS share:</span><br /> +<span>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):</span><br /> <br /> <!-- Generator: GNU source-highlight 3.1.9 by Lorenzo Bettini @@ -514,6 +526,7 @@ http://www.gnu.org/software/src-highlite --> <pre>> ~ kubectl get pods NAME READY STATUS RESTARTS AGE apache-deployment-5b96bd6b6b-fv2jx <font color="#000000">0</font>/<font color="#000000">1</font> ContainerCreating <font color="#000000">0</font> 9m15s +apache-deployment-5b96bd6b6b-ax2ji <font color="#000000">0</font>/<font color="#000000">1</font> ContainerCreating <font color="#000000">0</font> 9m15s > ~ kubectl describe pod apache-deployment-5b96bd6b6b-fv2jx | tail -n <font color="#000000">5</font> Events: |
