Skip to content

Commit aad7394

Browse files
authored
Merge pull request kubernetes#86152 from ialidzhikov/enh/sample-apiserver
Use Deployment in sample-apiserver examples
2 parents d19b724 + b8b846c commit aad7394

File tree

4 files changed

+8
-7
lines changed

4 files changed

+8
-7
lines changed

build/dependencies.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ dependencies:
1919
- path: cmd/kubeadm/app/constants/constants.go
2020
- path: hack/lib/etcd.sh
2121
match: ETCD_VERSION=
22-
- path: staging/src/k8s.io/sample-apiserver/artifacts/example/rc.yaml
22+
- path: staging/src/k8s.io/sample-apiserver/artifacts/example/deployment.yaml
2323
match: quay.io/coreos/etcd
2424
- path: test/e2e/framework/nodes_util.go
2525
match: const etcdImage

staging/src/k8s.io/sample-apiserver/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ docker push MYPREFIX/kube-sample-apiserver:MYTAG
119119

120120
### Deploy into a Kubernetes Cluster
121121

122-
Edit `artifacts/example/rc.yaml`, updating the pod template's image
122+
Edit `artifacts/example/deployment.yaml`, updating the pod template's image
123123
reference to match what you pushed and setting the `imagePullPolicy`
124124
to something suitable. Then call:
125125

staging/src/k8s.io/sample-apiserver/artifacts/example/rc.yaml renamed to staging/src/k8s.io/sample-apiserver/artifacts/example/deployment.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
apiVersion: v1
2-
kind: ReplicationController
1+
apiVersion: apps/v1
2+
kind: Deployment
33
metadata:
44
name: wardle-server
55
namespace: wardle
@@ -8,7 +8,8 @@ metadata:
88
spec:
99
replicas: 1
1010
selector:
11-
apiserver: "true"
11+
matchLabels:
12+
apiserver: "true"
1213
template:
1314
metadata:
1415
labels:

staging/src/k8s.io/sample-apiserver/docs/minikube-walkthrough.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ docker push <YOUR_DOCKERHUB_USER>/kube-sample-apiserver
4848

4949
## Modify the replication controller
5050

51-
You need to modify the [artifacts/example/rc.yaml](/artifacts/example/rc.yaml) file to change the ```imagePullPolicy``` to ```Always``` or ```IfNotPresent```.
51+
You need to modify the [artifacts/example/deployment.yaml](/artifacts/example/deployment.yaml) file to change the ```imagePullPolicy``` to ```Always``` or ```IfNotPresent```.
5252

5353
You also need to change the image from ```kube-sample-apiserver:latest``` to ```<YOUR_DOCKERHUB_USER>/kube-sample-apiserver:latest```. For example:
5454

@@ -83,7 +83,7 @@ kubectl create -f artifacts/example/rbac.yaml
8383
kubectl create -f artifacts/example/rbac-bind.yaml
8484
8585
# create the service and replication controller
86-
kubectl create -f artifacts/example/rc.yaml -n wardle
86+
kubectl create -f artifacts/example/deployment.yaml -n wardle
8787
kubectl create -f artifacts/example/service.yaml -n wardle
8888
8989
# create the apiservice object that tells kubernetes about your api extension and where in the cluster the server is located

0 commit comments

Comments
 (0)