From 50bb20ad58a61d063fa442f2167f5330d1e8b252 Mon Sep 17 00:00:00 2001 From: Damien Rajon <145502+pyrho@users.noreply.github.com> Date: Wed, 17 Jun 2020 23:42:11 +0200 Subject: [PATCH] fix(k8s): update the manifests for k8s 1.18 (#524) Deployments are now in "apps/v1". --- k8s/gorush-deployment.yaml | 6 +++++- k8s/gorush-redis-deployment.yaml | 7 ++++++- k8s/gorush-service.yaml | 7 ++++++- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/k8s/gorush-deployment.yaml b/k8s/gorush-deployment.yaml index e07a458..963ed43 100644 --- a/k8s/gorush-deployment.yaml +++ b/k8s/gorush-deployment.yaml @@ -1,10 +1,14 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: gorush namespace: gorush spec: replicas: 3 + selector: + matchLabels: + app: gorush + tier: frontend template: metadata: labels: diff --git a/k8s/gorush-redis-deployment.yaml b/k8s/gorush-redis-deployment.yaml index 2f9a8e5..4ffa842 100644 --- a/k8s/gorush-redis-deployment.yaml +++ b/k8s/gorush-redis-deployment.yaml @@ -1,9 +1,14 @@ -apiVersion: extensions/v1beta1 +apiVersion: apps/v1 kind: Deployment metadata: name: redis namespace: gorush spec: + selector: + matchLabels: + app: redis + role: master + tier: backend replicas: 1 template: metadata: diff --git a/k8s/gorush-service.yaml b/k8s/gorush-service.yaml index 6fe818b..8a68b16 100644 --- a/k8s/gorush-service.yaml +++ b/k8s/gorush-service.yaml @@ -12,8 +12,13 @@ spec: tier: frontend # if your cluster supports it, uncomment the following to automatically create # an external load-balanced IP for the frontend service. - type: LoadBalancer + # type: LoadBalancer + # + # if you want to expose the service to the outside (without a load balancer in front) # type: NodePort + # + # if you want gorush to be accessible only within the cluster + # type: ClusterIP ports: - protocol: TCP port: 80