diff --git a/README.md b/README.md index b4bc3d17f2..8faf5b0f7e 100644 --- a/README.md +++ b/README.md @@ -57,9 +57,10 @@ Running in Docker Running in Kubernetes - `./setup.sh` - To run Polaris as a mini-deployment locally. This will create two pods that bind themselves to port `8181`. -- `kubectl get pods` - To check the status of the pods. -- `kubectl get deployment` - To check the status of the deployment. -- `kubectl describe deployment polaris-deployment` - To troubleshoot if things aren't working as expected. +- `kubectl port-forward svc/polaris-service -n polaris 8181:8181` - To create a secure connection between a local machine and a pod within the cluster. +- `kubectl get pods -n polaris` - To check the status of the pods. +- `kubectl get deployment -n polaris` - To check the status of the deployment. +- `kubectl describe deployment polaris-deployment -n polaris` - To troubleshoot if things aren't working as expected. Building docs - Docs are generated using [Redocly](https://redocly.com/docs/cli/installation). To regenerate them, run the following diff --git a/k8/deployment.yaml b/k8/deployment.yaml new file mode 100644 index 0000000000..3fac06c800 --- /dev/null +++ b/k8/deployment.yaml @@ -0,0 +1,37 @@ +apiVersion: v1 +kind: Namespace +metadata: + name: polaris +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: polaris-deployment + namespace: polaris +spec: + replicas: 2 + selector: + matchLabels: + app: polaris + template: + metadata: + labels: + app: polaris + spec: + containers: + - name: polaris + image: localhost:5001/polaris:latest + ports: + - containerPort: 8181 +--- +apiVersion: v1 +kind: Service +metadata: + name: polaris-service + namespace: polaris +spec: + selector: + app: polaris + ports: + - port: 8181 + targetPort: 8181