Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use Deployment in sample-apiserver examples #86152

Merged
merged 1 commit into from Dec 26, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/dependencies.yaml
Expand Up @@ -19,7 +19,7 @@ dependencies:
- path: cmd/kubeadm/app/constants/constants.go
- path: hack/lib/etcd.sh
match: ETCD_VERSION=
- path: staging/src/k8s.io/sample-apiserver/artifacts/example/rc.yaml
- path: staging/src/k8s.io/sample-apiserver/artifacts/example/deployment.yaml
match: quay.io/coreos/etcd
- path: test/e2e/framework/nodes_util.go
match: const etcdImage
Expand Down
2 changes: 1 addition & 1 deletion staging/src/k8s.io/sample-apiserver/README.md
Expand Up @@ -119,7 +119,7 @@ docker push MYPREFIX/kube-sample-apiserver:MYTAG

### Deploy into a Kubernetes Cluster

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

Expand Down
@@ -1,5 +1,5 @@
apiVersion: v1
kind: ReplicationController
apiVersion: apps/v1
kind: Deployment
metadata:
name: wardle-server
namespace: wardle
Expand All @@ -8,7 +8,8 @@ metadata:
spec:
replicas: 1
selector:
apiserver: "true"
matchLabels:
apiserver: "true"
template:
metadata:
labels:
Expand Down
Expand Up @@ -48,7 +48,7 @@ docker push <YOUR_DOCKERHUB_USER>/kube-sample-apiserver

## Modify the replication controller

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

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

Expand Down Expand Up @@ -83,7 +83,7 @@ kubectl create -f artifacts/example/rbac.yaml
kubectl create -f artifacts/example/rbac-bind.yaml

# create the service and replication controller
kubectl create -f artifacts/example/rc.yaml -n wardle
kubectl create -f artifacts/example/deployment.yaml -n wardle
kubectl create -f artifacts/example/service.yaml -n wardle

# create the apiservice object that tells kubernetes about your api extension and where in the cluster the server is located
Expand Down