mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-21 19:01:49 +00:00
Add v1beta3 files to update-demo
This commit is contained in:
parent
ce24a7b144
commit
d5ae2b56ad
@ -146,7 +146,11 @@ func TestExampleObjectSchemas(t *testing.T) {
|
|||||||
"service": &api.Service{},
|
"service": &api.Service{},
|
||||||
"replication-controller": &api.ReplicationController{},
|
"replication-controller": &api.ReplicationController{},
|
||||||
},
|
},
|
||||||
"../examples/update-demo": {
|
"../examples/update-demo/v1beta1": {
|
||||||
|
"kitten-rc": &api.ReplicationController{},
|
||||||
|
"nautilus-rc": &api.ReplicationController{},
|
||||||
|
},
|
||||||
|
"../examples/update-demo/v1beta3": {
|
||||||
"kitten-rc": &api.ReplicationController{},
|
"kitten-rc": &api.ReplicationController{},
|
||||||
"nautilus-rc": &api.ReplicationController{},
|
"nautilus-rc": &api.ReplicationController{},
|
||||||
},
|
},
|
||||||
|
@ -42,7 +42,7 @@ Now visit the the [demo website](http://localhost:8001/static). You won't see a
|
|||||||
Now we will turn up two replicas of an image. They all serve on internal port 80.
|
Now we will turn up two replicas of an image. They all serve on internal port 80.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ./cluster/kubectl.sh create -f examples/update-demo/nautilus-rc.yaml
|
$ ./cluster/kubectl.sh create -f examples/update-demo/v1beta1/nautilus-rc.yaml
|
||||||
```
|
```
|
||||||
|
|
||||||
After pulling the image from the Docker Hub to your worker nodes (which may take a minute or so) you'll see a couple of squares in the UI detailing the pods that are running along with the image that they are serving up. A cute little nautilus.
|
After pulling the image from the Docker Hub to your worker nodes (which may take a minute or so) you'll see a couple of squares in the UI detailing the pods that are running along with the image that they are serving up. A cute little nautilus.
|
||||||
@ -61,7 +61,7 @@ If you go back to the [demo website](http://localhost:8001/static/index.html) yo
|
|||||||
We will now update the docker image to serve a different image by doing a rolling update to a new Docker image.
|
We will now update the docker image to serve a different image by doing a rolling update to a new Docker image.
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ ./cluster/kubectl.sh rollingupdate update-demo-nautilus --update-period=10s -f examples/update-demo/kitten-rc.yaml
|
$ ./cluster/kubectl.sh rollingupdate update-demo-nautilus --update-period=10s -f examples/update-demo/v1beta1/kitten-rc.yaml
|
||||||
```
|
```
|
||||||
The rollingupdate command in kubectl will do 2 things:
|
The rollingupdate command in kubectl will do 2 things:
|
||||||
|
|
||||||
@ -106,7 +106,7 @@ $ export DOCKER_HUB_USER=my-docker-id
|
|||||||
$ ./examples/update-demo/build-images.sh
|
$ ./examples/update-demo/build-images.sh
|
||||||
```
|
```
|
||||||
|
|
||||||
To use your custom docker image in the above examples, you will need to change the image name in `examples/update-demo/nautilus-rc.yaml` and `examples/update-demo/kitten-rc.yaml`.
|
To use your custom docker image in the above examples, you will need to change the image name in `examples/update-demo/v1beta1/nautilus-rc.yaml` and `examples/update-demo/v1beta1/kitten-rc.yaml`.
|
||||||
|
|
||||||
### Image Copyright
|
### Image Copyright
|
||||||
|
|
||||||
|
20
examples/update-demo/v1beta3/kitten-rc.yaml
Normal file
20
examples/update-demo/v1beta3/kitten-rc.yaml
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
apiVersion: v1beta3
|
||||||
|
kind: ReplicationController
|
||||||
|
metadata:
|
||||||
|
name: update-demo-kitten
|
||||||
|
spec:
|
||||||
|
selector:
|
||||||
|
name: update-demo
|
||||||
|
version: kitten
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: update-demo
|
||||||
|
version: kitten
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: kubernetes/update-demo:kitten
|
||||||
|
name: update-demo
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
protocol: TCP
|
21
examples/update-demo/v1beta3/nautilus-rc.yaml
Normal file
21
examples/update-demo/v1beta3/nautilus-rc.yaml
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
apiVersion: v1beta3
|
||||||
|
kind: ReplicationController
|
||||||
|
metadata:
|
||||||
|
name: update-demo-nautilus
|
||||||
|
spec:
|
||||||
|
replicas: 2
|
||||||
|
selector:
|
||||||
|
name: update-demo
|
||||||
|
version: nautilus
|
||||||
|
template:
|
||||||
|
metadata:
|
||||||
|
labels:
|
||||||
|
name: update-demo
|
||||||
|
version: nautilus
|
||||||
|
spec:
|
||||||
|
containers:
|
||||||
|
- image: kubernetes/update-demo:nautilus
|
||||||
|
name: update-demo
|
||||||
|
ports:
|
||||||
|
- containerPort: 80
|
||||||
|
protocol: TCP
|
@ -43,7 +43,7 @@ var _ = Describe("kubectl", func() {
|
|||||||
|
|
||||||
// Constants.
|
// Constants.
|
||||||
var (
|
var (
|
||||||
updateDemoRoot = filepath.Join(testContext.repoRoot, "examples/update-demo")
|
updateDemoRoot = filepath.Join(testContext.repoRoot, "examples/update-demo/v1beta1")
|
||||||
nautilusPath = filepath.Join(updateDemoRoot, "nautilus-rc.yaml")
|
nautilusPath = filepath.Join(updateDemoRoot, "nautilus-rc.yaml")
|
||||||
kittenPath = filepath.Join(updateDemoRoot, "kitten-rc.yaml")
|
kittenPath = filepath.Join(updateDemoRoot, "kitten-rc.yaml")
|
||||||
)
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user