From 2ff5d55d6d5ceed4af72b7e8b94e62de8ea4e7e5 Mon Sep 17 00:00:00 2001 From: gjmzj Date: Sun, 3 Nov 2019 12:32:10 +0000 Subject: [PATCH] update APIs in v1.16 --- docs/guide/gitlab/app.yaml.md | 2 +- docs/guide/metallb.md | 2 +- docs/guide/networkpolicy.md | 1 - docs/guide/rollingupdateWithZeroDowntime.md | 3 +-- docs/practice/java_war_app.md | 2 +- .../dashboard/1.6.3/kubernetes-dashboard.yaml | 2 +- manifests/efk/fluentd-es-ds.yaml | 1 - manifests/es-cluster/elasticsearch/README.md | 2 +- .../elasticsearch/templates/client-deployment.yaml | 2 +- .../elasticsearch/templates/data-statefulset.yaml | 2 +- .../templates/master-statefulset.yaml | 2 +- manifests/heapster/grafana.yaml | 2 +- manifests/heapster/heapster.yaml | 2 +- manifests/heapster/influxdb-v1.1.1/influxdb.yaml | 2 +- manifests/heapster/influxdb-with-pv/influxdb.yaml | 2 +- manifests/heapster/influxdb.yaml | 2 +- .../templates/jenkins-master-deployment.yaml | 2 +- manifests/jenkins/values.yaml | 5 ++--- .../mariadb/templates/master-statefulset.yaml | 2 +- .../mariadb/templates/slave-statefulset.yaml | 2 +- manifests/prometheus/dingtalk-webhook.yaml | 2 +- .../prometheus/grafana/templates/deployment.yaml | 2 +- .../grafana/templates/podsecuritypolicy.yaml | 2 +- .../templates/alertmanager-deployment.yaml | 2 +- .../templates/kube-state-metrics-deployment.yaml | 2 +- .../templates/node-exporter-daemonset.yaml | 2 +- .../templates/pushgateway-deployment.yaml | 2 +- .../prometheus/templates/server-deployment.yaml | 2 +- roles/calico/templates/calico-v3.2.yaml.j2 | 14 ++++---------- roles/calico/templates/calico-v3.3.yaml.j2 | 14 ++++---------- roles/calico/templates/calico-v3.4.yaml.j2 | 14 ++++---------- .../cilium/files/star_war_example/http-sw-app.yaml | 2 +- roles/cilium/templates/cilium.yaml.j2 | 8 ++++---- roles/cluster-addon/templates/kubedns.yaml.j2 | 3 +-- .../templates/metallb/metallb.yaml.j2 | 4 ++-- roles/cluster-storage/files/alicloud-disk.yaml | 2 +- .../templates/alicloud-nas/alicloud-nas.yaml.j2 | 2 +- .../templates/nfs/nfs-client-provisioner.yaml.j2 | 2 +- roles/kube-router/templates/kuberouter.yaml.j2 | 5 ++--- 39 files changed, 52 insertions(+), 76 deletions(-) diff --git a/docs/guide/gitlab/app.yaml.md b/docs/guide/gitlab/app.yaml.md index 7e92825..662b464 100644 --- a/docs/guide/gitlab/app.yaml.md +++ b/docs/guide/gitlab/app.yaml.md @@ -21,7 +21,7 @@ data: type: kubernetes.io/dockerconfigjson --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: APP_NAME diff --git a/docs/guide/metallb.md b/docs/guide/metallb.md index 989e116..d384498 100644 --- a/docs/guide/metallb.md +++ b/docs/guide/metallb.md @@ -53,7 +53,7 @@ speaker-n79l4 1/1 Running 0 4h ``` bash # 创建测试应用 $ cat > test-nginx.yaml << EOF -apiVersion: apps/v1beta2 +apiVersion: apps/v1 kind: Deployment metadata: name: nginx3 diff --git a/docs/guide/networkpolicy.md b/docs/guide/networkpolicy.md index a08635d..d05ea5f 100644 --- a/docs/guide/networkpolicy.md +++ b/docs/guide/networkpolicy.md @@ -2,7 +2,6 @@ `Network Policy`提供了基于策略的网络控制,用于隔离应用并减少攻击面。它使用标签选择器模拟传统的分段网络,并通过策略控制它们之间的流量以及来自外部的流量;目前基于`linux iptables`实现,使用类似`nf_conntrack`检查记录网络流量`session`从而决定流量是否阻断;因此它是`状态检测防火墙`。 -- `k8s v1.7`版本以后,Network Policy已经默认可用;`v1.6`以及之前版本需要在kube-apiserver中开启extensions/v1beta1/networkpolicies - 网络插件要支持 Network Policy,如 Calico、Romana、Weave Net ### 简单示例 diff --git a/docs/guide/rollingupdateWithZeroDowntime.md b/docs/guide/rollingupdateWithZeroDowntime.md index f2fc37f..5e33427 100644 --- a/docs/guide/rollingupdateWithZeroDowntime.md +++ b/docs/guide/rollingupdateWithZeroDowntime.md @@ -87,7 +87,7 @@ k8s精确地控制着整个发布过程,分批次有序地进行着滚动更 如果未指定这两个可选参数,则k8s会使用默认配置: ``` bash root@kube-aio:~# kubectl get deploy busy -o yaml -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: annotations: @@ -99,7 +99,6 @@ metadata: name: busy namespace: default resourceVersion: "199461" - selfLink: /apis/extensions/v1beta1/namespaces/default/deployments/busy uid: 93fde307-a359-11e8-a93b-525400c61543 spec: progressDeadlineSeconds: 600 diff --git a/docs/practice/java_war_app.md b/docs/practice/java_war_app.md index 89f7c7a..6d6bbc0 100644 --- a/docs/practice/java_war_app.md +++ b/docs/practice/java_war_app.md @@ -89,7 +89,7 @@ RUN sed -i 's/^JAVA_OPTS=.*webresources\"$/JAVA_OPTS=\"$JAVA_OPTS -Djava.protoco ``` --- -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: TemplateProject diff --git a/manifests/dashboard/1.6.3/kubernetes-dashboard.yaml b/manifests/dashboard/1.6.3/kubernetes-dashboard.yaml index ba21596..3ea72ea 100644 --- a/manifests/dashboard/1.6.3/kubernetes-dashboard.yaml +++ b/manifests/dashboard/1.6.3/kubernetes-dashboard.yaml @@ -41,7 +41,7 @@ subjects: namespace: kube-system --- kind: Deployment -apiVersion: apps/v1beta1 +apiVersion: apps/v1 metadata: labels: k8s-app: kubernetes-dashboard diff --git a/manifests/efk/fluentd-es-ds.yaml b/manifests/efk/fluentd-es-ds.yaml index 9932d35..2681224 100644 --- a/manifests/efk/fluentd-es-ds.yaml +++ b/manifests/efk/fluentd-es-ds.yaml @@ -70,7 +70,6 @@ spec: # supports critical pod annotation based priority scheme. # Note that this does not guarantee admission on the nodes (#40573). annotations: - scheduler.alpha.kubernetes.io/critical-pod: '' seccomp.security.alpha.kubernetes.io/pod: 'docker/default' spec: priorityClassName: system-node-critical diff --git a/manifests/es-cluster/elasticsearch/README.md b/manifests/es-cluster/elasticsearch/README.md index e29464f..3fe64eb 100644 --- a/manifests/es-cluster/elasticsearch/README.md +++ b/manifests/es-cluster/elasticsearch/README.md @@ -175,7 +175,7 @@ Create StorageClass for SSD-PD ``` $ kubectl create -f - <