Add a page expanding the PHP Guestbook with Redis example to include logs and metrics (#13889)
* adding Elastic Stack for logging and monitoring * added section on deploying Elasticsearch and Kibana * more detail * more detail * First draft * Using tutorial template. * more goodness * Describe autodiscover * added verification steps * Added cluster role binding * Use Redis metrics and logs * cleanup * add cleanup * unused * Added language tags * Added glossary_tooltip * Added link * Placed alternative steps in tabs * shorten heading * uppercase for Kubernetes objects * cleanup secret * grammar * updated title and linked from the guestbook tutorial * added reviewer. Thanks Tim! * Removed default username/password * typo, verbosity, more info.
This commit is contained in:
committed by
Kubernetes Prow Robot
parent
84fe95e2ef
commit
3f6e182b70
@@ -13,8 +13,8 @@ card:
|
||||
{{% capture overview %}}
|
||||
This tutorial shows you how to build and deploy a simple, multi-tier web application using Kubernetes and [Docker](https://www.docker.com/). This example consists of the following components:
|
||||
|
||||
* A single-instance [Redis](https://redis.io/) master to store guestbook entries
|
||||
* Multiple [replicated Redis](https://redis.io/topics/replication) instances to serve reads
|
||||
* A single-instance [Redis](https://redis.io/) master to store guestbook entries
|
||||
* Multiple [replicated Redis](https://redis.io/topics/replication) instances to serve reads
|
||||
* Multiple web frontend instances
|
||||
|
||||
{{% /capture %}}
|
||||
@@ -83,7 +83,7 @@ The guestbook applications needs to communicate to the Redis master to write its
|
||||
|
||||
{{< codenew file="application/guestbook/redis-master-service.yaml" >}}
|
||||
|
||||
1. Apply the Redis Master Service from the following `redis-master-service.yaml` file:
|
||||
1. Apply the Redis Master Service from the following `redis-master-service.yaml` file:
|
||||
|
||||
```shell
|
||||
kubectl apply -f https://k8s.io/examples/application/guestbook/redis-master-service.yaml
|
||||
@@ -114,9 +114,9 @@ Although the Redis master is a single pod, you can make it highly available to m
|
||||
|
||||
### Creating the Redis Slave Deployment
|
||||
|
||||
Deployments scale based off of the configurations set in the manifest file. In this case, the Deployment object specifies two replicas.
|
||||
Deployments scale based off of the configurations set in the manifest file. In this case, the Deployment object specifies two replicas.
|
||||
|
||||
If there are not any replicas running, this Deployment would start the two replicas on your container cluster. Conversely, if there are more than two replicas are running, it would scale down until two replicas are running.
|
||||
If there are not any replicas running, this Deployment would start the two replicas on your container cluster. Conversely, if there are more than two replicas are running, it would scale down until two replicas are running.
|
||||
|
||||
{{< codenew file="application/guestbook/redis-slave-deployment.yaml" >}}
|
||||
|
||||
@@ -204,7 +204,7 @@ The `redis-slave` and `redis-master` Services you applied are only accessible wi
|
||||
If you want guests to be able to access your guestbook, you must configure the frontend Service to be externally visible, so a client can request the Service from outside the container cluster. Minikube can only expose Services through `NodePort`.
|
||||
|
||||
{{< note >}}
|
||||
Some cloud providers, like Google Compute Engine or Google Kubernetes Engine, support external load balancers. If your cloud provider supports load balancers and you want to use it, simply delete or comment out `type: NodePort`, and uncomment `type: LoadBalancer`.
|
||||
Some cloud providers, like Google Compute Engine or Google Kubernetes Engine, support external load balancers. If your cloud provider supports load balancers and you want to use it, simply delete or comment out `type: NodePort`, and uncomment `type: LoadBalancer`.
|
||||
{{< /note >}}
|
||||
|
||||
{{< codenew file="application/guestbook/frontend-service.yaml" >}}
|
||||
@@ -218,7 +218,7 @@ Some cloud providers, like Google Compute Engine or Google Kubernetes Engine, su
|
||||
1. Query the list of Services to verify that the frontend Service is running:
|
||||
|
||||
```shell
|
||||
kubectl get services
|
||||
kubectl get services
|
||||
```
|
||||
|
||||
The response should be similar to this:
|
||||
@@ -268,7 +268,7 @@ If you deployed the `frontend-service.yaml` manifest with type: `LoadBalancer` y
|
||||
|
||||
1. Copy the external IP address, and load the page in your browser to view your guestbook.
|
||||
|
||||
## Scale the Web Frontend
|
||||
## Scale the Web Frontend
|
||||
|
||||
Scaling up or down is easy because your servers are defined as a Service that uses a Deployment controller.
|
||||
|
||||
@@ -284,7 +284,7 @@ Scaling up or down is easy because your servers are defined as a Service that us
|
||||
kubectl get pods
|
||||
```
|
||||
|
||||
The response should look similar to this:
|
||||
The response should look similar to this:
|
||||
|
||||
```
|
||||
NAME READY STATUS RESTARTS AGE
|
||||
@@ -320,7 +320,7 @@ Scaling up or down is easy because your servers are defined as a Service that us
|
||||
redis-slave-2005841000-fpvqc 1/1 Running 0 1h
|
||||
redis-slave-2005841000-phfv9 1/1 Running 0 1h
|
||||
```
|
||||
|
||||
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture cleanup %}}
|
||||
@@ -345,14 +345,14 @@ Deleting the Deployments and Services also deletes any running Pods. Use labels
|
||||
deployment.apps "frontend" deleted
|
||||
service "frontend" deleted
|
||||
```
|
||||
|
||||
|
||||
1. Query the list of Pods to verify that no Pods are running:
|
||||
|
||||
```shell
|
||||
kubectl get pods
|
||||
```
|
||||
|
||||
The response should be this:
|
||||
The response should be this:
|
||||
|
||||
```
|
||||
No resources found.
|
||||
@@ -361,9 +361,9 @@ Deleting the Deployments and Services also deletes any running Pods. Use labels
|
||||
{{% /capture %}}
|
||||
|
||||
{{% capture whatsnext %}}
|
||||
* Add [ELK logging and monitoring](../guestbook-logs-metrics-with-elk/) to your Guestbook application
|
||||
* Complete the [Kubernetes Basics](/docs/tutorials/kubernetes-basics/) Interactive Tutorials
|
||||
* Use Kubernetes to create a blog using [Persistent Volumes for MySQL and Wordpress](/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/#visit-your-new-wordpress-blog)
|
||||
* Use Kubernetes to create a blog using [Persistent Volumes for MySQL and Wordpress](/docs/tutorials/stateful-application/mysql-wordpress-persistent-volume/#visit-your-new-wordpress-blog)
|
||||
* Read more about [connecting applications](/docs/concepts/services-networking/connect-applications-service/)
|
||||
* Read more about [Managing Resources](/docs/concepts/cluster-administration/manage-deployment/#using-labels-effectively)
|
||||
{{% /capture %}}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user