diff --git a/test/kubemark/iks/startup.sh b/test/kubemark/iks/startup.sh index 27a152a6ef7..833c89b9fab 100644 --- a/test/kubemark/iks/startup.sh +++ b/test/kubemark/iks/startup.sh @@ -21,8 +21,8 @@ KUBEMARK_DIRECTORY="${KUBE_ROOT}/test/kubemark" RESOURCE_DIRECTORY="${KUBEMARK_DIRECTORY}/resources" # Generate secret and configMap for the hollow-node pods to work, prepare -# manifests of the hollow-node and heapster replication controllers from -# templates, and finally create these resources through kubectl. +# manifests of the hollow-node and heapster deployments from templates, +# and finally create these resources through kubectl. function create-kube-hollow-node-resources { # Create kubeconfig for Kubelet. KUBELET_KUBECONFIG_CONTENTS="$(cat < "${RESOURCE_DIRECTORY}/hollow-node.yaml" @@ -250,7 +250,7 @@ EOF sed -i'' -e "s'{{kubemark_mig_config}}'${KUBEMARK_MIG_CONFIG:-}'g" "${RESOURCE_DIRECTORY}/hollow-node.yaml" "${KUBECTL}" create -f "${RESOURCE_DIRECTORY}/hollow-node.yaml" --namespace="kubemark" - echo "Created secrets, configMaps, replication-controllers required for hollow-nodes." + echo "Created secrets, configMaps, deployments required for hollow-nodes." } # Wait until all hollow-nodes are running or there is a timeout. @@ -318,4 +318,4 @@ echo "" # shellcheck disable=SC2154 # Color defined in sourced script echo -e "${color_blue}SUCCESS${color_norm}" clean-repo -exit 0 \ No newline at end of file +exit 0 diff --git a/test/kubemark/resources/heapster_template.json b/test/kubemark/resources/heapster_template.json index 5a9bb512ea1..f751033be14 100644 --- a/test/kubemark/resources/heapster_template.json +++ b/test/kubemark/resources/heapster_template.json @@ -1,6 +1,6 @@ { - "kind": "ReplicationController", - "apiVersion": "v1", + "kind": "Deployment", + "apiVersion": "apps/v1", "metadata": { "name": "heapster-v1.3.0", "labels": { @@ -11,8 +11,9 @@ "spec": { "replicas": 1, "selector": { - "k8s-app": "heapster", - "version": "v1.3.0" + "matchLabels": + "k8s-app": "heapster", + "version": "v1.3.0" }, "template": { "metadata": { diff --git a/test/kubemark/resources/hollow-node_template.yaml b/test/kubemark/resources/hollow-node_template.yaml index 5c2b87c60ab..f20e8f0781d 100644 --- a/test/kubemark/resources/hollow-node_template.yaml +++ b/test/kubemark/resources/hollow-node_template.yaml @@ -1,5 +1,5 @@ -apiVersion: v1 -kind: ReplicationController +apiVersion: apps/v1 +kind: Deployment metadata: name: hollow-node labels: @@ -8,7 +8,8 @@ metadata: spec: replicas: {{numreplicas}} selector: - name: hollow-node + matchLabels: + name: hollow-node template: metadata: labels: diff --git a/test/kubemark/start-kubemark.sh b/test/kubemark/start-kubemark.sh index 87bbbddb89a..d985b98d8e0 100755 --- a/test/kubemark/start-kubemark.sh +++ b/test/kubemark/start-kubemark.sh @@ -82,8 +82,8 @@ function delete-kubemark-image { } # Generate secret and configMap for the hollow-node pods to work, prepare -# manifests of the hollow-node and heapster replication controllers from -# templates, and finally create these resources through kubectl. +# manifests of the hollow-node and heapster deployments from templates, +# and finally create these resources through kubectl. function create-kube-hollow-node-resources { # Create kubemark namespace. "${KUBECTL}" create -f "${RESOURCE_DIRECTORY}/kubemark-ns.json" @@ -142,7 +142,7 @@ function create-kube-hollow-node-resources { "${KUBECTL}" create -f "${RESOURCE_DIRECTORY}/addons" --namespace="kubemark" - # Create the replication controller for hollow-nodes. + # Create the deployment for hollow-nodes. # We allow to override the NUM_REPLICAS when running Cluster Autoscaler. NUM_REPLICAS=${NUM_REPLICAS:-${NUM_NODES}} sed "s@{{numreplicas}}@${NUM_REPLICAS}@g" "${RESOURCE_DIRECTORY}/hollow-node_template.yaml" > "${RESOURCE_DIRECTORY}/hollow-node.yaml" @@ -174,7 +174,7 @@ function create-kube-hollow-node-resources { sed -i'' -e "s@{{kubemark_mig_config}}@${KUBEMARK_MIG_CONFIG:-}@g" "${RESOURCE_DIRECTORY}/hollow-node.yaml" "${KUBECTL}" create -f "${RESOURCE_DIRECTORY}/hollow-node.yaml" --namespace="kubemark" - echo "Created secrets, configMaps, replication-controllers required for hollow-nodes." + echo "Created secrets, configMaps, deployments required for hollow-nodes." } # Wait until all hollow-nodes are running or there is a timeout.