Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Correctly use custom kubernetes context if specified #451

Merged
merged 1 commit into from
Mar 8, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Correctly use custom kubernetes context if specified
  • Loading branch information
schustmi committed Mar 8, 2022
commit 27f2b42764778f17820ac0499cb54bf1d9de962f
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
import kfp
import urllib3
from kfp_server_api.exceptions import ApiException
from kubernetes import config

import zenml.io.utils
from zenml.enums import OrchestratorFlavor, StackComponentType
Expand Down Expand Up @@ -211,11 +210,8 @@ def _upload_and_run_pipeline(
self.kubernetes_context,
)

# load kubernetes config to authorize the KFP client
config.load_kube_config(context=self.kubernetes_context)

# upload the pipeline to Kubeflow and start it
client = kfp.Client()
client = kfp.Client(kube_context=self.kubernetes_context)
if runtime_configuration.schedule:
try:
experiment = client.get_experiment(pipeline_name)
Expand Down