Shaoyi Zhang
09/16/2021, 5:19 PMPREFECT__CLOUD__AGENT__AGENT_ADDRESS
field fo Kubernetes deployment without modifying the yaml file directly? Is there a command line argument that I can use? I was suspecting --agent-address
, but that’s not available.
- name: PREFECT__CLOUD__AGENT__AGENT_ADDRESS
value: http://:8080
Below is the command I’m testing
prefect agent kubernetes install --backend cloud --api "<https://api.prefect.io>" --namespace xxxxx --tenant-id xxxxx --service-account-name xxxx --key xxxx --rbac | kubectl apply --namespace=xxxxx -f -
Kevin Kho
Shaoyi Zhang
09/16/2021, 5:22 PMThe connection to the server localhost:8080 was refused - did you specify the right host or port?
Shaoyi Zhang
09/16/2021, 5:24 PMKevin Kho
prefect agent kubernetes install
, this is what I get
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
app: prefect-agent
name: prefect-agent
spec:
replicas: 1
selector:
matchLabels:
app: prefect-agent
template:
metadata:
labels:
app: prefect-agent
spec:
containers:
- args:
- prefect agent kubernetes start
command:
- /bin/bash
- -c
env:
- name: PREFECT__CLOUD__AGENT__AUTH_TOKEN
value: ''
- name: PREFECT__CLOUD__API
value: <https://api.prefect.io>
- name: NAMESPACE
value: default
- name: IMAGE_PULL_SECRETS
value: ''
- name: PREFECT__CLOUD__AGENT__LABELS
value: '[]'
- name: JOB_MEM_REQUEST
value: ''
- name: JOB_MEM_LIMIT
value: ''
- name: JOB_CPU_REQUEST
value: ''
- name: JOB_CPU_LIMIT
value: ''
- name: IMAGE_PULL_POLICY
value: ''
- name: SERVICE_ACCOUNT_NAME
value: ''
- name: PREFECT__BACKEND
value: cloud
- name: PREFECT__CLOUD__AGENT__AGENT_ADDRESS
value: http://:8080
- name: PREFECT__CLOUD__API_KEY
value: API_KEY
- name: PREFECT__CLOUD__TENANT_ID
value: ''
image: prefecthq/prefect:0.15.5-python3.6
imagePullPolicy: Always
livenessProbe:
failureThreshold: 2
httpGet:
path: /api/health
port: 8080
initialDelaySeconds: 40
periodSeconds: 40
name: agent
Kevin Kho
Kevin Kho
prefect backend cloud
on your machine also?Shaoyi Zhang
09/16/2021, 5:36 PMprefect backend cloud
, but got same error. Let me poke my Kubernetes configuration.Kevin Kho
Shaoyi Zhang
09/16/2021, 6:20 PM--context
flag in kubectl command. This is unrelated to Prefect. Thank you for pointing me to the right direction!Shaoyi Zhang
09/16/2021, 9:40 PMShaoyi Zhang
09/16/2021, 9:41 PM[2021-09-16 21:36:20,885] INFO - agent | Registering agent...
[2021-09-16 21:36:21,222] INFO - agent | Registration successful!
____ __ _ _ _
| _ \ _ __ ___ / _| ___ ___| |_ / \ __ _ ___ _ __ | |_
| |_) | '__/ _ \ |_ / _ \/ __| __| / _ \ / _` |/ _ \ '_ \| __|
| __/| | | __/ _| __/ (__| |_ / ___ \ (_| | __/ | | | |_
|_| |_| \___|_| \___|\___|\__| /_/ \_\__, |\___|_| |_|\__|
|___/
[2021-09-16 21:36:21,536] INFO - agent | Starting KubernetesAgent with labels ['dev']
[2021-09-16 21:36:21,536] INFO - agent | Agent documentation can be found at <https://docs.prefect.io/orchestration/>
[2021-09-16 21:36:21,537] INFO - agent | Waiting for flow runs...
Kevin Kho
Shaoyi Zhang
09/16/2021, 10:00 PMKevin Kho
Shaoyi Zhang
09/16/2021, 10:02 PMShaoyi Zhang
09/16/2021, 10:02 PMKevin Kho
Shaoyi Zhang
09/16/2021, 10:04 PMShaoyi Zhang
09/16/2021, 10:04 PM