diff --git a/kubernetes/mongo_db.yml b/kubernetes/mongo_db.yml new file mode 100644 index 0000000..4a231ad --- /dev/null +++ b/kubernetes/mongo_db.yml @@ -0,0 +1,34 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: mongodb-deployment + labels: + app: mongodb +spec: + replicas: 1 + selector: + matchLabels: + app: mongodb + template: + metadata: + labels: + app: mongodb + spec: + containers: + - name: mongodb + image: mongo + ports: + - containerPort: 27017 + +--- +apiVersion: v1 +kind: Service +metadata: + name: mongodb-service +spec: + selector: + app: mongodb + ports: + - protocol: TCP + port: 27017 + targetPort: 27017 \ No newline at end of file diff --git a/kubernetes/thruster.yml b/kubernetes/thruster.yml new file mode 100644 index 0000000..393ca0a --- /dev/null +++ b/kubernetes/thruster.yml @@ -0,0 +1,32 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: cluster-thruster +spec: + selector: + matchLabels: + run: cluster-thruster + template: + metadata: + labels: + run: cluster-thruster + spec: + containers: + - name: cluster-thruster + image: cluster-thruster + ports: + - containerPort: 8080 +--- +apiVersion: v1 +kind: Service +metadata: + name: cluster-thruster-external +spec: + clusterIP: 10.102.68.76 + type: LoadBalancer + selector: + run: cluster-thruster + ports: + - name: http + protocol: TCP + port: 8080 diff --git a/skaffold.yml b/skaffold.yml new file mode 100644 index 0000000..2a2f06c --- /dev/null +++ b/skaffold.yml @@ -0,0 +1,28 @@ +apiVersion: skaffold/v2beta29 +kind: Config +metadata: + name: app +build: + artifacts: + - image: cluster-thruster + context: . +deploy: + kubectl: + manifests: + - ./kubernetes/mongo_db.yml + - ./kubernetes/thruster.yml +profiles: + # "gcb" profile allows building and pushing the images + # on Google Container Builder without requiring docker + # installed on the developer machine. However, note that + # since GCB does not cache the builds, each build will + # start from scratch and therefore take a long time. + # + # This is not used by default. To use it, run: + # skaffold run -p gcb + - name: gcb + build: + googleCloudBuild: + diskSizeGb: 300 + machineType: N1_HIGHCPU_32 + timeout: 4000s \ No newline at end of file