Commit 6a34b2cc authored by k8s-merge-robot's avatar k8s-merge-robot

Merge pull request #16411 from feihujiang/deleteSimpleYamlDocInUserGuide

Auto commit by PR queue bot
parents 0f7b1b4d ef0239a0
...@@ -77,8 +77,8 @@ but with different flags and/or different memory and cpu requests for different ...@@ -77,8 +77,8 @@ but with different flags and/or different memory and cpu requests for different
### Required Fields ### Required Fields
As with all other Kubernetes config, a DaemonSet needs `apiVersion`, `kind`, and `metadata` fields. For As with all other Kubernetes config, a DaemonSet needs `apiVersion`, `kind`, and `metadata` fields. For
general information about working with config files, see [here](../user-guide/simple-yaml.md), general information about working with config files, see [deploying applications](../user-guide/deploying-applications.md),
[here](../user-guide/configuring-containers.md), and [here](../user-guide/working-with-resources.md). [configuring containers](../user-guide/configuring-containers.md), and [working with resources](../user-guide/working-with-resources.md) documents.
A DaemonSet also needs a [`.spec`](../devel/api-conventions.md#spec-and-status) section. A DaemonSet also needs a [`.spec`](../devel/api-conventions.md#spec-and-status) section.
......
...@@ -114,7 +114,7 @@ A minimal Ingress might look like: ...@@ -114,7 +114,7 @@ A minimal Ingress might look like:
*POSTing this to the API server will have no effect if you have not configured an [Ingress controller](#ingress-controllers).* *POSTing this to the API server will have no effect if you have not configured an [Ingress controller](#ingress-controllers).*
__Lines 1-4__: As with all other Kubernetes config, an Ingress needs `apiVersion`, `kind`, and `metadata` fields. For general information about working with config files, see [here](simple-yaml.md), [here](configuring-containers.md), and [here](working-with-resources.md). __Lines 1-4__: As with all other Kubernetes config, an Ingress needs `apiVersion`, `kind`, and `metadata` fields. For general information about working with config files, see [deploying applications](deploying-applications.md), [configuring containers](configuring-containers.md), and [working with resources](working-with-resources.md) documents.
__Lines 5-7__: Ingress [spec](../devel/api-conventions.md#spec-and-status) has all the information needed to configure a loadbalancer or proxy server. Most importantly, it contains a list of rules matched against all incoming requests. Currently the Ingress resource only supports http rules. __Lines 5-7__: Ingress [spec](../devel/api-conventions.md#spec-and-status) has all the information needed to configure a loadbalancer or proxy server. Most importantly, it contains a list of rules matched against all incoming requests. Currently the Ingress resource only supports http rules.
......
...@@ -143,8 +143,8 @@ $ kubectl logs pi-aiw0a ...@@ -143,8 +143,8 @@ $ kubectl logs pi-aiw0a
## Writing a Job Spec ## Writing a Job Spec
As with all other Kubernetes config, a Job needs `apiVersion`, `kind`, and `metadata` fields. For As with all other Kubernetes config, a Job needs `apiVersion`, `kind`, and `metadata` fields. For
general information about working with config files, see [here](simple-yaml.md), general information about working with config files, see [deploying applications](deploying-applications.md),
[here](configuring-containers.md), and [here](working-with-resources.md). [configuring containers](configuring-containers.md), and [working with resources](working-with-resources.md) documents.
A Job also needs a [`.spec` section](../devel/api-conventions.md#spec-and-status). A Job also needs a [`.spec` section](../devel/api-conventions.md#spec-and-status).
......
...@@ -121,8 +121,8 @@ It is a recommended practice to put resources related to the same microservice o ...@@ -121,8 +121,8 @@ It is a recommended practice to put resources related to the same microservice o
A URL can also be specified as a configuration source, which is handy for deploying directly from configuration files checked into github: A URL can also be specified as a configuration source, which is handy for deploying directly from configuration files checked into github:
```console ```console
$ kubectl create -f https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/docs/user-guide/replication.yaml $ kubectl create -f https://raw.githubusercontent.com/GoogleCloudPlatform/kubernetes/master/docs/user-guide/pod.yaml
replicationcontrollers/nginx pods/nginx
``` ```
## Bulk operations in kubectl ## Bulk operations in kubectl
......
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
spec:
replicas: 3
selector:
app: nginx
template:
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
...@@ -84,7 +84,7 @@ In order to access your nginx landing page, you also have to make sure that traf ...@@ -84,7 +84,7 @@ In order to access your nginx landing page, you also have to make sure that traf
### Next: Configuration files ### Next: Configuration files
Most people will eventually want to use declarative configuration files for creating/modifying their applications. A [simplified introduction](simple-yaml.md) Most people will eventually want to use declarative configuration files for creating/modifying their applications. A [simplified introduction](deploying-applications.md)
is given in a different document. is given in a different document.
......
...@@ -31,100 +31,7 @@ Documentation for other releases can be found at ...@@ -31,100 +31,7 @@ Documentation for other releases can be found at
<!-- END MUNGE: UNVERSIONED_WARNING --> <!-- END MUNGE: UNVERSIONED_WARNING -->
## Getting started with config files. ### This document has been subsumed by [deploying-applications.md](deploying-applications.md)
In addition to the imperative style commands described [elsewhere](simple-nginx.md), Kubernetes
supports declarative YAML or JSON configuration files. Often times config files are preferable
to imperative commands, since they can be checked into version control and changes to the files
can be code reviewed, producing a more robust, reliable and archival system.
### Running a container from a pod configuration file
```console
$ cd kubernetes
$ kubectl create -f ./pod.yaml
```
Where pod.yaml contains something like:
<!-- BEGIN MUNGE: EXAMPLE pod.yaml -->
```yaml
apiVersion: v1
kind: Pod
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
```
[Download example](pod.yaml?raw=true)
<!-- END MUNGE: EXAMPLE pod.yaml -->
You can see your cluster's pods:
```console
$ kubectl get pods
```
and delete the pod you just created:
```console
$ kubectl delete pods nginx
```
### Running a replicated set of containers from a configuration file
To run replicated containers, you need a [Replication Controller](replication-controller.md).
A replication controller is responsible for ensuring that a specific number of pods exist in the
cluster.
```console
$ cd kubernetes
$ kubectl create -f ./replication.yaml
```
Where `replication.yaml` contains:
<!-- BEGIN MUNGE: EXAMPLE replication.yaml -->
```yaml
apiVersion: v1
kind: ReplicationController
metadata:
name: nginx
spec:
replicas: 3
selector:
app: nginx
template:
metadata:
name: nginx
labels:
app: nginx
spec:
containers:
- name: nginx
image: nginx
ports:
- containerPort: 80
```
[Download example](replication.yaml?raw=true)
<!-- END MUNGE: EXAMPLE replication.yaml -->
To delete the replication controller (and the pods it created):
```console
$ kubectl delete rc nginx
```
<!-- BEGIN MUNGE: GENERATED_ANALYTICS --> <!-- BEGIN MUNGE: GENERATED_ANALYTICS -->
[![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/simple-yaml.md?pixel)]() [![Analytics](https://kubernetes-site.appspot.com/UA-36037335-10/GitHub/docs/user-guide/simple-yaml.md?pixel)]()
......
...@@ -225,7 +225,6 @@ func TestExampleObjectSchemas(t *testing.T) { ...@@ -225,7 +225,6 @@ func TestExampleObjectSchemas(t *testing.T) {
"../docs/user-guide": { "../docs/user-guide": {
"multi-pod": nil, "multi-pod": nil,
"pod": &api.Pod{}, "pod": &api.Pod{},
"replication": &api.ReplicationController{},
"job": &extensions.Job{}, "job": &extensions.Job{},
"ingress": &extensions.Ingress{}, "ingress": &extensions.Ingress{},
"nginx-deployment": &extensions.Deployment{}, "nginx-deployment": &extensions.Deployment{},
...@@ -464,7 +463,6 @@ func TestReadme(t *testing.T) { ...@@ -464,7 +463,6 @@ func TestReadme(t *testing.T) {
{"../README.md", []runtime.Object{&api.Pod{}}}, {"../README.md", []runtime.Object{&api.Pod{}}},
{"../docs/user-guide/walkthrough/README.md", []runtime.Object{&api.Pod{}}}, {"../docs/user-guide/walkthrough/README.md", []runtime.Object{&api.Pod{}}},
{"../examples/iscsi/README.md", []runtime.Object{&api.Pod{}}}, {"../examples/iscsi/README.md", []runtime.Object{&api.Pod{}}},
{"../docs/user-guide/simple-yaml.md", []runtime.Object{&api.Pod{}, &api.ReplicationController{}}},
} }
for _, path := range paths { for _, path := range paths {
......
...@@ -84,7 +84,7 @@ In order to access your nginx landing page, you also have to make sure that traf ...@@ -84,7 +84,7 @@ In order to access your nginx landing page, you also have to make sure that traf
### Next: Configuration files ### Next: Configuration files
Most people will eventually want to use declarative configuration files for creating/modifying their applications. A [simplified introduction](../docs/user-guide/simple-yaml.md) Most people will eventually want to use declarative configuration files for creating/modifying their applications. A [simplified introduction](../docs/user-guide/deploying-applications.md)
is given in a different document. is given in a different document.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment