diff --git a/kubernetes/README.md b/kubernetes/README.md new file mode 100644 index 0000000..8b42f8c --- /dev/null +++ b/kubernetes/README.md @@ -0,0 +1,13 @@ +# Crewlink on Kubernetes + +Currently the kubernetes implementation is a single pod scheduled for a single node. + +As the application progresses, it may be possible to run replicas of the pods. + +Replace the server name, `ServerNameHere`, with your desired name. + +Apply it: `kubectl apply -f http.yml` + +The application will be available on port 80 over HTTP at the service's external address. + +The pod itself listens on HTTP. You can configure your load balancer or other reverse proxy to terminate HTTPS traffic destined for the pod. \ No newline at end of file diff --git a/kubernetes/http.yml b/kubernetes/http.yml new file mode 100644 index 0000000..8af34f9 --- /dev/null +++ b/kubernetes/http.yml @@ -0,0 +1,43 @@ +apiVersion: apps/v1 +kind: Deployment +metadata: + name: crewlink +spec: + replicas: 1 + selector: + matchLabels: + name: crewlink + template: + metadata: + labels: + name: crewlink + spec: + restartPolicy: Always + containers: + - name: crewlink + image: ottomated/crewlink-server:latest + ports: + - name: voice + containerPort: 9736 + protocol: TCP + env: + - name: ADDRESS + valueFrom: + fieldRef: + fieldPath: status.podIP + - name: NAME + value: ServerNameHere +--- +apiVersion: v1 +kind: Service +metadata: + name: crewlink +spec: + selector: + name: crewlink + ports: + - protocol: TCP + name: crewlink + port: 80 + targetPort: 9736 + type: LoadBalancer