eddy davies
09/28/2022, 1:23 PMhelm install --values k8s-agent.yaml prefect-agent prefect/prefect-agent && \
helm install --values k8s-orion.yaml prefect-orion prefect/prefect-orion
eddy davies
09/28/2022, 1:24 PMexport POD_NAME=$(kubectl get pods --namespace default -l "<http://app.kubernetes.io/name=prefect-orion,app.kubernetes.io/instance=prefect-orion|app.kubernetes.io/name=prefect-orion,app.kubernetes.io/instance=prefect-orion>" -o jsonpath="{.items[0].metadata.name}")
export CONTAINER_PORT=$(kubectl get pod --namespace default $POD_NAME -o jsonpath="{.spec.containers[0].ports[0].containerPort}")
echo "Visit <http://127.0.0.1:8080> to use your application"
kubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT
Visit <http://127.0.0.1:8080> to use your application
Unable to listen on port 8080: Listeners failed to create with the following errors: [unable to create listener: Error listen tcp4 127.0.0.1:8080: bind: address already in use unable to create listener: Error listen tcp6 [::1]:8080: bind: address already in use]
error: unable to listen on any of the requested ports: [{8080 4200}]
eddy davies
09/28/2022, 1:25 PM## connection settings
# -- one of 'cloud' or 'orion'
apiConfig: "orion"
k8s-orion.yaml
# -- array with environment variables to add to orion nodes
# env: []
env:
- name: PREFECT_API_URL
value: <http://prefect-orion:4200/api>
eddy davies
09/28/2022, 1:25 PMjpuris
09/28/2022, 1:43 PMkubectl --namespace default port-forward $POD_NAME 8080:$CONTAINER_PORT
it is trying to port forward the server running in a pod on k8s to your local machine, so then you could open it in
Visit <http://127.0.0.1:8080> to use your application
It fails to do so, because your local system’s 8080 port is already in use.eddy davies
09/28/2022, 2:58 PMeddy davies
09/28/2022, 3:01 PMHandling connection for 8083
E0928 15:57:32.386853 5341 portforward.go:406] an error occurred forwarding 8083 -> 4200: error forwarding port 4200 to pod ba8d96a71da86b9a1605b48f1b85315e8a9908f5471a123d34c536dbf743f9cd, uid : exit status 1: 2022/09/28 14:57:32 socat[22297] E connect(5, AF=2 127.0.0.1:4200, 16): Connection refused
E0928 15:57:32.387535 5341 portforward.go:234] lost connection to pod
eddy davies
09/28/2022, 3:39 PMjpuris
09/28/2022, 4:17 PMjpuris
09/28/2022, 4:18 PME0928 15:57:32.386853 5341 portforward.go:406] an error occurred forwarding 8083 -> 4200: error forwarding port 4200 to pod
happens because of the pod crash 🤷eddy davies
09/28/2022, 4:44 PMwith self.open(mode='w', encoding=encoding, errors=errors, newline=newline) as f:
File "/usr/local/lib/python3.10/pathlib.py", line 1119, in open
return self._accessor.open(self, mode, buffering, encoding, errors,
OSError: [Errno 30] Read-only file system: '/opt/prefect/memo_store.toml'
ERROR: Application startup failed. Exiting.
Orion stopped!
eddy davies
09/29/2022, 12:22 PMeddy davies
10/04/2022, 3:40 PMJamie Zieziula
10/04/2022, 3:49 PMcontainerSecurityContext:
runAsUser: 0
runAsNonRoot: false
readOnlyRootFilesystem: false
Jamie Zieziula
10/04/2022, 6:07 PMJamie Zieziula
10/05/2022, 2:18 PMJamie Zieziula
10/06/2022, 6:56 PM