Consolidate YAML files [part-2] (#9236)
Changes that will help upcoming consolidation work: - Add variable `githubWebsiteRaw` to config.toml to facilitate building links to raw YAML files - Revise `codenew` shortcode to generate links to raw YAML files instead of github.com file view; - Rename `artifacts` directory to `examples` to better reflect its usage; Accompanied changes as show cases: - Moved `deployment.yaml`, `deployment-update.yaml` and `deployment-scale.yaml` to the new `examples/application` subdirectory; - Removed duplicate instances of the above YAML files in other directories; - Update example_test.go to test the relocated YAML files and removed testing for files that no longer needed.
This commit is contained in:
@@ -65,7 +65,7 @@ A Deployment object defines a Pod creation template (a "cookie-cutter" if you wi
|
||||
|
||||
Here is a Deployment that instantiates two nginx Pods:
|
||||
|
||||
{{< code file="deployment.yaml" >}}
|
||||
{{< codenew file="application/deployment.yaml" >}}
|
||||
|
||||
|
||||
### Deployment Management
|
||||
@@ -73,7 +73,7 @@ Here is a Deployment that instantiates two nginx Pods:
|
||||
Create an nginx Deployment:
|
||||
|
||||
```shell
|
||||
kubectl create -f https://k8s.io/docs/tutorials/deployment.yaml
|
||||
kubectl create -f https://k8s.io/examples/application/deployment.yaml
|
||||
```
|
||||
|
||||
List all Deployments:
|
||||
@@ -91,10 +91,10 @@ kubectl get pods -l app=nginx
|
||||
Upgrade the nginx container from 1.7.9 to 1.8 by changing the Deployment and calling `apply`. The following config
|
||||
contains the desired changes:
|
||||
|
||||
{{< code file="deployment-update.yaml" >}}
|
||||
{{< codenew file="application/deployment-update.yaml" >}}
|
||||
|
||||
```shell
|
||||
kubectl apply -f https://k8s.io/docs/tutorials/deployment-update.yaml
|
||||
kubectl apply -f https://k8s.io/examples/application/deployment-update.yaml
|
||||
```
|
||||
|
||||
Watch the Deployment create Pods with new names and delete the old Pods:
|
||||
|
||||
Reference in New Issue
Block a user