Reduce heading levels by 1.
This commit is contained in:
@@ -29,7 +29,7 @@ provides load balancing for an application that has two running instances.
|
||||
|
||||
{% capture lessoncontent %}
|
||||
|
||||
### Creating a service for an application running in two pods
|
||||
## Creating a service for an application running in two pods
|
||||
|
||||
1. Run a Hello World application in your cluster:
|
||||
|
||||
@@ -111,7 +111,7 @@ provides load balancing for an application that has two running instances.
|
||||
|
||||
Hello Kubernetes!
|
||||
|
||||
### Using a service configuration file
|
||||
## Using a service configuration file
|
||||
|
||||
As an alternative to using `kubectl expose`, you can use a
|
||||
[service configuration file](/docs/user-guide/services/operations)
|
||||
|
||||
@@ -36,7 +36,7 @@ external IP address.
|
||||
|
||||
{% capture lessoncontent %}
|
||||
|
||||
### Creating a service for an application running in five pods
|
||||
## Creating a service for an application running in five pods
|
||||
|
||||
1. Run a Hello World application in your cluster:
|
||||
|
||||
|
||||
@@ -38,7 +38,7 @@ driver.
|
||||
|
||||
{% capture lessoncontent %}
|
||||
|
||||
### Create a Minikube cluster
|
||||
## Create a Minikube cluster
|
||||
|
||||
This tutorial uses [Minikube](https://github.com/kubernetes/minikube) to
|
||||
create a local cluster. This tutorial also assumes you are using
|
||||
@@ -94,7 +94,7 @@ Verify that `kubectl` is configured to communicate with your cluster:
|
||||
kubectl cluster-info
|
||||
```
|
||||
|
||||
### Create your Node.js application
|
||||
## Create your Node.js application
|
||||
|
||||
The next step is to write the application. Save this code in a folder named `hellonode`
|
||||
with the filename `server.js`:
|
||||
@@ -113,7 +113,7 @@ Stop the running Node.js server by pressing **Ctrl-C**.
|
||||
|
||||
The next step is to package your application in a Docker container.
|
||||
|
||||
### Create a Docker container image
|
||||
## Create a Docker container image
|
||||
|
||||
Create a file, also in the `hellonode` folder, named `Dockerfile`. A Dockerfile describes
|
||||
the image that you want to build. You can build a Docker container image by extending an
|
||||
@@ -145,7 +145,7 @@ docker build -t hello-node:v1 .
|
||||
|
||||
Now the Minikube VM can run the image you built.
|
||||
|
||||
### Create a Deployment
|
||||
## Create a Deployment
|
||||
|
||||
A Kubernetes [*Pod*](/docs/user-guide/pods/) is a group of one or more Containers,
|
||||
tied together for the purposes of administration and networking. The Pod in this
|
||||
@@ -206,7 +206,7 @@ kubectl config view
|
||||
For more information about `kubectl`commands, see the
|
||||
[kubectl overview](/docs/user-guide/kubectl-overview/).
|
||||
|
||||
### Create a Service
|
||||
## Create a Service
|
||||
|
||||
By default, the Pod is only accessible by its internal IP address within the
|
||||
Kubernetes cluster. To make the `hello-node` Container accessible from outside the
|
||||
@@ -254,7 +254,7 @@ you should now be able to see some logs:
|
||||
kubectl logs <POD-NAME>
|
||||
```
|
||||
|
||||
### Update your app
|
||||
## Update your app
|
||||
|
||||
Edit your `server.js` file to return a new message:
|
||||
|
||||
@@ -281,7 +281,7 @@ Run your app again to view the new message:
|
||||
minikube service hello-node
|
||||
```
|
||||
|
||||
### Clean up
|
||||
## Clean up
|
||||
|
||||
Now you can clean up the resources you created in your cluster:
|
||||
|
||||
|
||||
@@ -27,7 +27,7 @@ This page shows how to run an application using a Kubernetes Deployment object.
|
||||
|
||||
{% capture lessoncontent %}
|
||||
|
||||
### Creating and exploring an nginx deployment
|
||||
## Creating and exploring an nginx deployment
|
||||
|
||||
You can run an application by creating a Kubernetes Deployment object, and you
|
||||
can describe a Deployment in a YAML file. For example, this YAML file describes
|
||||
@@ -72,7 +72,7 @@ a Deployment that runs the nginx:1.7.9 Docker image:
|
||||
|
||||
where `<pod-name>` is the name of one of your pods.
|
||||
|
||||
### Updating the deployment
|
||||
## Updating the deployment
|
||||
|
||||
You can update the deployment by applying a new YAML file. This YAML file
|
||||
specifies that the deployment should be updated to use nginx 1.8.
|
||||
@@ -87,7 +87,7 @@ specifies that the deployment should be updated to use nginx 1.8.
|
||||
|
||||
kubectl get pods -l app=nginx
|
||||
|
||||
### Scaling the application by increasing the replica count
|
||||
## Scaling the application by increasing the replica count
|
||||
|
||||
You can increase the number of pods in your Deployment by applying a new YAML
|
||||
file. This YAML file sets `replicas` to 4, which specifies that the Deployment
|
||||
@@ -111,7 +111,7 @@ should have four pods:
|
||||
nginx-deployment-148880595-fxcez 1/1 Running 0 2m
|
||||
nginx-deployment-148880595-rwovn 1/1 Running 0 2m
|
||||
|
||||
### Deleting a deployment
|
||||
## Deleting a deployment
|
||||
|
||||
Delete the deployment by name:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user