From 9fb8aadbece2879594eef3d0fc1b50c0005d835c Mon Sep 17 00:00:00 2001 From: Bin Liu Date: Thu, 1 Feb 2018 05:45:51 +0800 Subject: [PATCH] Fix broken links and API version (#7145) * Fix broken links and API version * Fix CI error --- docs/concepts/cluster-administration/manage-deployment.md | 5 +++-- docs/concepts/cluster-administration/nginx-app.yaml | 7 ++++++- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/docs/concepts/cluster-administration/manage-deployment.md b/docs/concepts/cluster-administration/manage-deployment.md index fbd059e156..f1c640a7b2 100644 --- a/docs/concepts/cluster-administration/manage-deployment.md +++ b/docs/concepts/cluster-administration/manage-deployment.md @@ -49,7 +49,7 @@ 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: ```shell -$ kubectl create -f https://raw.githubusercontent.com/kubernetes/kubernetes/master/docs/user-guide/nginx-deployment.yaml +$ kubectl create -f https://raw.githubusercontent.com/kubernetes/website/master/docs/user-guide/nginx-deployment.yaml deployment "nginx-deployment" created ``` @@ -85,7 +85,7 @@ NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE my-nginx-svc 10.0.0.208 80/TCP 0s ``` -With the above commands, we first create resources under docs/user-guide/nginx/ and print the resources created with `-o name` output format +With the above commands, we first create resources under `docs/user-guide/nginx/` and print the resources created with `-o name` output format (print each resource as resource/name). Then we `grep` only the "service", and then print it with `kubectl get`. If you happen to organize your resources across several subdirectories within a particular directory, you can recursively perform the operations on the subdirectories also, by specifying `--recursive` or `-R` alongside the `--filename,-f` flag. @@ -328,6 +328,7 @@ Currently, resources are created without this annotation, so the first invocatio All subsequent calls to `kubectl apply`, and other commands that modify the configuration, such as `kubectl replace` and `kubectl edit`, will update the annotation, allowing subsequent calls to `kubectl apply` to detect and perform deletions using a three-way diff. **Note:** To use apply, always create resource initially with either `kubectl apply` or `kubectl create --save-config`. +{: .note} ### kubectl edit diff --git a/docs/concepts/cluster-administration/nginx-app.yaml b/docs/concepts/cluster-administration/nginx-app.yaml index bc7e095646..c3f926b74e 100644 --- a/docs/concepts/cluster-administration/nginx-app.yaml +++ b/docs/concepts/cluster-administration/nginx-app.yaml @@ -11,12 +11,17 @@ spec: selector: app: nginx --- -apiVersion: apps/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: my-nginx + labels: + app: nginx spec: replicas: 3 + selector: + matchLabels: + app: nginx template: metadata: labels: