eddy davies
10/31/2022, 4:58 PMconfig
file in my .kube
file but doesn't seem to work, any advice?eddy davies
10/31/2022, 4:59 PMprefect deployment build log_flow.py:log_flow -n log-flow-s3 -sb s3/hubspot -q test -o log-flow-s3-k8s-deployment.yaml -t test -ib kubernetes-job/k8s-demo
This works without the -ib
tag but obviously runs as process and expects me to start an agent locallyeddy davies
10/31/2022, 5:03 PMhelm install --values k8s-agent.yaml prefect-agent prefect/prefect-agent
where the --values
yaml is
agent:
image:
repository: prefecthq/prefect
prefectTag: 2-python3.10
pullPolicy: IfNotPresent
config:
workQueues:
- test
cloudApiConfig:
accountId: ""
workspaceId: ""
with ids addededdy davies
10/31/2022, 5:04 PMkubectl apply -f prefect-secrets.yaml
apiVersion: v1
stringData:
key: ""
kind: Secret
metadata:
name: prefect-api-key
namespace: default
type: Opaque
Nate
10/31/2022, 5:13 PMKubernetesClusterConfig
block? is it specified within your kubernetes-job/k8s-demo
block?
also, are you seeing some sort of error in your agent logs?eddy davies
10/31/2022, 5:29 PMblock = block_cls.parse_obj(block_document.data)
File "pydantic/main.py", line 521, in pydantic.main.BaseModel.parse_obj
File "/Users/edwarddavies/.pyenv/versions/3.10.5/envs/prefect-k8s/lib/python3.10/site-packages/prefect/blocks/core.py", line 175, in __init__
super().__init__(*args, **kwargs)
File "pydantic/main.py", line 341, in pydantic.main.BaseModel.__init__
pydantic.error_wrappers.ValidationError: 1 validation error for KubernetesJob
cluster_config -> config
value is not a valid dict (type=type_error.dict)
An exception occurred.
Nate
10/31/2022, 5:51 PMKubernetesClusterConfig
block using its from_file
method?
so like in ipython or something you could do
from prefect.blocks.kubernetes import KubernetesClusterConfig
my_new_k8s_config = KubernetesClusterConfig.from_file(path="~/.kube/config")
my_new_k8s_config.save("my-new-k8s-config-block-name")
eddy davies
10/31/2022, 10:04 PMeddy davies
10/31/2022, 10:04 PM