Use apps/v1 API group whenever possible (#8055)
The use of extensions/v1beta1, apps/v1beta1 and apps/v1beta2 API groups should be discouraged. Closes: #8049
This commit is contained in:
@@ -52,7 +52,7 @@ kind: Pod
|
|||||||
metadata:
|
metadata:
|
||||||
...
|
...
|
||||||
ownerReferences:
|
ownerReferences:
|
||||||
- apiVersion: extensions/v1beta1
|
- apiVersion: apps/v1
|
||||||
controller: true
|
controller: true
|
||||||
blockOwnerDeletion: true
|
blockOwnerDeletion: true
|
||||||
kind: ReplicaSet
|
kind: ReplicaSet
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: ReplicaSet
|
kind: ReplicaSet
|
||||||
metadata:
|
metadata:
|
||||||
name: my-repset
|
name: my-repset
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ rules:
|
|||||||
verbs:
|
verbs:
|
||||||
- '*'
|
- '*'
|
||||||
---
|
---
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
@@ -71,6 +71,7 @@ spec:
|
|||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
app: rancher
|
app: rancher
|
||||||
|
ima: pod
|
||||||
strategy: {}
|
strategy: {}
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
@@ -220,7 +221,7 @@ rules:
|
|||||||
verbs:
|
verbs:
|
||||||
- '*'
|
- '*'
|
||||||
---
|
---
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
creationTimestamp: null
|
creationTimestamp: null
|
||||||
|
|||||||
@@ -11,7 +11,7 @@ metadata:
|
|||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
---
|
---
|
||||||
kind: ClusterRoleBinding
|
kind: ClusterRoleBinding
|
||||||
apiVersion: rbac.authorization.k8s.io/v1beta1
|
apiVersion: rbac.authorization.k8s.io/v1
|
||||||
metadata:
|
metadata:
|
||||||
name: system:cloud-controller-manager
|
name: system:cloud-controller-manager
|
||||||
roleRef:
|
roleRef:
|
||||||
@@ -23,7 +23,7 @@ subjects:
|
|||||||
name: cloud-controller-manager
|
name: cloud-controller-manager
|
||||||
namespace: kube-system
|
namespace: kube-system
|
||||||
---
|
---
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
@@ -78,13 +78,14 @@ Note that this is the same as if you had started the `Deployment` with
|
|||||||
the following YAML:
|
the following YAML:
|
||||||
|
|
||||||
```yaml
|
```yaml
|
||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
metadata:
|
metadata:
|
||||||
name: hostnames
|
name: hostnames
|
||||||
spec:
|
spec:
|
||||||
selector:
|
selector:
|
||||||
app: hostnames
|
matchLabels:
|
||||||
|
app: hostnames
|
||||||
replicas: 3
|
replicas: 3
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: DaemonSet
|
kind: DaemonSet
|
||||||
metadata:
|
metadata:
|
||||||
name: fluentd-gcp-v2.0
|
name: fluentd-gcp-v2.0
|
||||||
@@ -8,6 +8,11 @@ metadata:
|
|||||||
addonmanager.kubernetes.io/mode: Reconcile
|
addonmanager.kubernetes.io/mode: Reconcile
|
||||||
version: v2.0
|
version: v2.0
|
||||||
spec:
|
spec:
|
||||||
|
selector:
|
||||||
|
matchLabels:
|
||||||
|
k8s-app: fluentd-gcp
|
||||||
|
kubernetes.io/cluster-service: "true"
|
||||||
|
version: v2.0
|
||||||
updateStrategy:
|
updateStrategy:
|
||||||
type: RollingUpdate
|
type: RollingUpdate
|
||||||
template:
|
template:
|
||||||
|
|||||||
@@ -169,7 +169,7 @@ metadata:
|
|||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
scaleTargetRef:
|
scaleTargetRef:
|
||||||
apiVersion: apps/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
name: php-apache
|
name: php-apache
|
||||||
minReplicas: 1
|
minReplicas: 1
|
||||||
@@ -250,7 +250,7 @@ metadata:
|
|||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
scaleTargetRef:
|
scaleTargetRef:
|
||||||
apiVersion: apps/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
name: php-apache
|
name: php-apache
|
||||||
minReplicas: 1
|
minReplicas: 1
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ metadata:
|
|||||||
namespace: default
|
namespace: default
|
||||||
spec:
|
spec:
|
||||||
scaleTargetRef:
|
scaleTargetRef:
|
||||||
apiVersion: apps/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: Deployment
|
kind: Deployment
|
||||||
name: php-apache
|
name: php-apache
|
||||||
minReplicas: 1
|
minReplicas: 1
|
||||||
|
|||||||
@@ -10,9 +10,9 @@ title: Perform Rolling Update Using a Replication Controller
|
|||||||
## Overview
|
## Overview
|
||||||
|
|
||||||
**Note**: The preferred way to create a replicated application is to use a
|
**Note**: The preferred way to create a replicated application is to use a
|
||||||
[Deployment](/docs/reference/generated/kubernetes-api/{{page.version}}/#deployment-v1beta1-apps),
|
[Deployment](/docs/reference/generated/kubernetes-api/{{page.version}}/#deployment-v1-apps),
|
||||||
which in turn uses a
|
which in turn uses a
|
||||||
[ReplicaSet](/docs/reference/generated/kubernetes-api/{{page.version}}/#replicaset-v1beta1-extensions).
|
[ReplicaSet](/docs/reference/generated/kubernetes-api/{{page.version}}/#replicaset-v1-apps).
|
||||||
For more information, see
|
For more information, see
|
||||||
[Running a Stateless Application Using a Deployment](/docs/tasks/run-application/run-stateless-application-deployment/).
|
[Running a Stateless Application Using a Deployment](/docs/tasks/run-application/run-stateless-application-deployment/).
|
||||||
{: .note}
|
{: .note}
|
||||||
|
|||||||
@@ -1,22 +1,17 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: ReplicaSet
|
kind: ReplicaSet
|
||||||
metadata:
|
metadata:
|
||||||
name: frontend
|
name: frontend
|
||||||
# these labels can be applied automatically
|
labels:
|
||||||
# from the labels in the pod template if not set
|
app: guestbook
|
||||||
# labels:
|
tier: frontend
|
||||||
# app: guestbook
|
|
||||||
# tier: frontend
|
|
||||||
spec:
|
spec:
|
||||||
# this replicas value is default
|
# this replicas value is default
|
||||||
# modify it according to your case
|
# modify it according to your case
|
||||||
replicas: 3
|
replicas: 3
|
||||||
# selector can be applied automatically
|
|
||||||
# from the labels in the pod template if not set,
|
|
||||||
# but we are specifying the selector here to
|
|
||||||
# demonstrate its usage.
|
|
||||||
selector:
|
selector:
|
||||||
matchLabels:
|
matchLabels:
|
||||||
|
app: guestbook
|
||||||
tier: frontend
|
tier: frontend
|
||||||
matchExpressions:
|
matchExpressions:
|
||||||
- {key: tier, operator: In, values: [frontend]}
|
- {key: tier, operator: In, values: [frontend]}
|
||||||
|
|||||||
@@ -1,23 +1,20 @@
|
|||||||
apiVersion: extensions/v1beta1
|
apiVersion: apps/v1
|
||||||
kind: ReplicaSet
|
kind: ReplicaSet
|
||||||
metadata:
|
metadata:
|
||||||
name: redis-slave
|
name: redis-slave
|
||||||
# these labels can be applied automatically
|
labels:
|
||||||
# from the labels in the pod template if not set
|
app: redis
|
||||||
# labels:
|
role: slave
|
||||||
# app: redis
|
tier: backend
|
||||||
# role: slave
|
|
||||||
# tier: backend
|
|
||||||
spec:
|
spec:
|
||||||
# this replicas value is default
|
# this replicas value is default
|
||||||
# modify it according to your case
|
# modify it according to your case
|
||||||
replicas: 2
|
replicas: 2
|
||||||
# selector can be applied automatically
|
selector:
|
||||||
# from the labels in the pod template if not set
|
matchLabels:
|
||||||
# selector:
|
app: redis
|
||||||
# app: guestbook
|
role: slave
|
||||||
# role: slave
|
tier: backend
|
||||||
# tier: backend
|
|
||||||
template:
|
template:
|
||||||
metadata:
|
metadata:
|
||||||
labels:
|
labels:
|
||||||
|
|||||||
Reference in New Issue
Block a user