mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-07-23 11:50:44 +00:00
Use Deployment in sample-apiserver examples
Signed-off-by: ialidzhikov <i.alidjikov@gmail.com>
This commit is contained in:
parent
bd1195c28e
commit
b8b846c31c
@ -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
|
||||
|
@ -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:
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
apiVersion: v1
|
||||
kind: ReplicationController
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: wardle-server
|
||||
namespace: wardle
|
||||
@ -8,7 +8,8 @@ metadata:
|
||||
spec:
|
||||
replicas: 1
|
||||
selector:
|
||||
apiserver: "true"
|
||||
matchLabels:
|
||||
apiserver: "true"
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
@ -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:
|
||||
|
||||
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user