Install Kubeflow
The ML scenarios section is being refined. Individual steps and examples may be added. If you have questions, contact the Shturval platform team.
This guide Delivered as a separate bundledescribes how to install Kubeflow in a client cluster that is already created. You need access to the client cluster, the management cluster, and the mirror host.
The installation deploys:
- Kubeflow — Dashboard v2, Notebooks, Pipelines, Experiments, Training, Serving (in-cluster KServe), Katib, TensorBoard, Hub;
- an Ingress for Kubeflow at
kubeflow.<commonName>, or a Gateway on a host that includes the Gateway IP.
See also: External access to KServe.
How to use this page
Step 1 runs in the management cluster: create a separate OIDC client for Kubeflow. Do not reuse an OIDC client of another platform service.
Step 2 runs in the client cluster: a ShturvalServicePatch (SSP) for Cilium, the kubeflow-step-0 … kubeflow-step-4 installation chain, and a check of Istio labels. After step 1, switch to the client cluster.
Each GUI and CLI tab ends with a check. Do not go to the next step until that check matches the expected result.
External access to KServe does not affect the Kubeflow installation and is described separately: External access to KServe.
Steps in the client cluster have GUI and CLI tabs. Loading patches to the mirror is done on the mirror host, from the console only.
In the GUI, load Kubernetes and platform custom-resource manifests through Import manifests: the import icon to the left of the user name → paste the YAML → Check → Save. Separate several objects in one file with ---. To install charts, see How to deploy a new service.
Replace the placeholders with your own values:
| Placeholder | Where to get it |
|---|---|
Cluster with Ingress NGINX<commonName> | status.appliedCustomValues.controller.shturval.commonName of SSC shturval-ingress-controller |
<CLUSTER_NAME> | name of the client cluster in the management cluster |
Cluster with Gateway<IP-Gateway> | a free IP from a CiliumLoadBalancerIPPool created in advance. Required only when you publish Kubeflow through a Gateway |
Cluster with Gateway<hostname-Gateway> | hostname of the Kubeflow Gateway. This is not the commonName of shturval-ingress-controller: the FQDN must contain the Gateway IP. With the platform automatic scheme: kubeflow.<CLUSTER_NAME>.ip-<IP-Gateway>.shturval.link. Replace dots in the IP with hyphens |
<KUBEFLOW_LOGIN> | login of the user who will be the Kubeflow administrator. By default this is the sub claim in the OIDC token |
Before you start
The client cluster is already installed. Check:
- the client cluster’s
ClusterConfigin the management cluster hasstatus.update.readyset totrueandstatus.update.phaseset toComplete; - SSC
shturval-ingress-controllerhascommonNameset — the hostkubeflow.<commonName>is built from it. This check is only for publication through Ingress; - if the cluster publishes services through a Gateway: the Cilium Gateway API controller is already enabled, the GatewayClass name is
cilium, and you do not apply a separate SSP for the controller. Reserve a free IP: beforekubeflow-step-2it is used to create a dedicatedCiliumLoadBalancerIPPool. The chart does not take an address from another pool. The Kubeflow host in this case is<hostname-Gateway>; do not checkcommonName. Details: How to enable the Gateway API controller in Cilium; - Deployment
shturval-services-controller-managerin namespaceshturval-services-systemis running (1/1). If it is0/0, the Kubeflow SSCs will not install; - the license includes Enterprise ML: Types of license.
For the CLI path, the administrator workstation needs kubectl and openssl. Use openssl to generate cookie_secret for the Kubeflow oauth2-proxy and, for HTTPS, to export the CA of the external S3 storage.
- Open the management cluster.
- Administration → Custom resources → group
cluster.shturval.tech→ ClusterConfig → the object named after the client cluster. Instatus.update,readymust betrueandphasemust beComplete. - Open the client cluster. Services and repositories → Installed services →
shturval-ingress-controller→ Manage → Manifest tab. Findcontroller.shturval.commonNameand save the value. This is<commonName>. - Deployment
shturval-services-controller-managerin namespaceshturval-services-systemmust be1/1. If it is0/0, scale it to one replica. Otherwise the Kubeflow SSCs will not install.
export KUBECONFIG_MGMT=<path-to-the-management-cluster-kubeconfig>
export KUBECONFIG_CLIENT=<path-to-the-client-cluster-kubeconfig>
kubectl --kubeconfig "${KUBECONFIG_MGMT}" get clusterconfig <cluster-name> -n <cluster-name> \
-o jsonpath='{.status.update.ready}{" "}{.status.update.phase}{"\n"}'
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" get ssc shturval-ingress-controller \
-o jsonpath='{.status.appliedCustomValues.controller.shturval.commonName}{"\n"}'
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" get deploy -n shturval-services-system \
shturval-services-controller-manager
If the Deployment is 0/0:
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" scale deploy \
-n shturval-services-system shturval-services-controller-manager --replicas=1
This step runs on the mirror host, not in the cluster GUI. Without it the client cluster cannot download the Kubeflow Helm charts.
sudo -i
cd /opt/mirror
Apply the archives from the delivery kit in this order:
| Component | What it adds to the mirror |
|---|---|
| Kubeflow 26.03.1, chart archives | Helm charts kubeflow-step-0 … kubeflow-step-4 |
| Kubeflow 26.03.1 Helm patch | Helm chart updates, if the delivery includes them |
| Kubeflow 26.03.1 patch | additional fixes, if the delivery includes them |
For each archive:
rm -rf shturval-patch && mkdir shturval-patch
wget <archive-URL-from-the-delivery> -O shturval-patch/<file-name>.tgz
./stm patch apply
rm -rf shturval-patch
Take archive URLs only from the delivery kit. Do not publish internal links to file servers.
You will need these values in the manifests of the next steps.
| Parameter | Required | Purpose | Where to get it | Where it is used |
|---|---|---|---|---|
CERT_CLUSTER_ISSUER | Yes | ClusterIssuer for TLS of the Kubeflow entry point. Usually shturval-self-signed | ClusterIssuer name in the client cluster: Administration → ClusterIssuers. If you have no issuer of your own, use shturval-self-signed | step 2, TLS of the Kubeflow Ingress or Gateway |
cookie_secret | Yes | for the Kubeflow oauth2-proxy | generate it with openssl rand -hex 16 | step 2, kubeflow-step-1 |
<KUBEFLOW_LOGIN> | Yes | Kubeflow administrator login | user login from OIDC. By default this is the sub claim | kubeflow-step-4 installation, field user-namespace.profiles[].name |
Choose storage for Kubeflow Pipelines and Katib
Kubeflow Pipelines uses one MySQL instance and one object storage for the whole cluster. This is a limit of the upstream Kubeflow project. The shared KFP UI account must have access to the buckets of all profiles. Katib stores experiment metadata in a separate MySQL database, which can run on the same server. KFP supports MySQL and does not support PostgreSQL.
The object storage must support the AWS IAM API (creating users and policies), not only S3 operations such as PutObject and GetObject. The Pipelines profile controller (sync.py) creates an IAM user and a policy for each Profile. Upstream Kubeflow targets SeaweedFS. A plain S3-compatible storage without IAM (some Ceph RGW implementations, MinIO without IAM) will not work.
Prepare the external MySQL and S3 values for step 2:
| Parameter | Purpose | Where it is used |
|---|---|---|
KFP_MYSQL_HOST / KFP_MYSQL_PORT | address of the external MySQL for Pipelines | step 2, kubeflow-step-2 |
KFP_MYSQL_PIPELINE_DB / KFP_MYSQL_METADATA_DB | two databases: pipelines and metadata | step 2, kubeflow-step-2 |
KFP_MYSQL_USER / KFP_MYSQL_PASSWORD | MySQL account | step 2, kubeflow-step-2 |
KFP_S3_ENDPOINT | object storage URL (https:// or http://). For HTTPS, set the root CA in s3.ca: If S3 uses HTTPS | step 2, kubeflow-step-2 |
KFP_AWS_IAM_ENDPOINT | AWS IAM API endpoint of the same storage: sync.py creates per-profile users and policies | step 2, kubeflow-step-2 |
KFP_AWS_REGION / KFP_S3_BUCKET | region and artifact bucket | step 2, kubeflow-step-2 |
KFP_AWS_ACCESS_KEY / KFP_AWS_SECRET_KEY | global keys for the KFP UI and controller | step 2, kubeflow-step-2 |
KATIB_MYSQL_HOST / KATIB_MYSQL_PORT / KATIB_MYSQL_DB | external MySQL for Katib | step 2, kubeflow-step-3 |
KATIB_MYSQL_USER / KATIB_MYSQL_PASSWORD | Katib account | step 2, kubeflow-step-3 |
KATIB_MYSQL_SECRET_NAME | name of the Secret with Katib credentials. Default: katib-mysql-secrets | step 2, kubeflow-step-3 |
Step 1. Create an OIDC client for Kubeflow in the management cluster
The OIDC client is required to open Kubeflow through the platform SSO. Create the resource in the management cluster, in the namespace named after the client cluster.
The client must accept the redirect URI of the entry point: kubeflow.<commonName> for Ingress, <hostname-Gateway> for Gateway. With providerType: shturval, the platform creates a client of the built-in provider.
- Open the management cluster.
- Import the manifest with your parameter values:
apiVersion: auth.shturval.tech/v1beta1
kind: AuthOidcClient
metadata:
name: <CLUSTER_NAME>-kubeflow
namespace: <CLUSTER_NAME>
spec:
providerType: shturval
Or create the object in Administration → Custom resources → API group auth.shturval.tech → AuthOidcClient → + Add.
- Wait until the object status shows
ready: trueand fillsstatus.clientInfo.issuerUrlandstatus.clientSecretRef. - Open namespace
<CLUSTER_NAME>and the Secret fromclientSecretRef(the name looks like<CLUSTER_NAME>-kubeflow-<random-suffix>). Copyclient_idandclient_secret. - Save the issuer URL from the
AuthOidcClientstatus. This isOIDC_ISSUER_URL.
export KUBECONFIG_MGMT=<path-to-the-management-cluster-kubeconfig>
export CLUSTER_NAME=<client-cluster-name>
kubectl --kubeconfig "${KUBECONFIG_MGMT}" apply -f - <<EOF
apiVersion: auth.shturval.tech/v1beta1
kind: AuthOidcClient
metadata:
name: ${CLUSTER_NAME}-kubeflow
namespace: ${CLUSTER_NAME}
spec:
providerType: shturval
EOF
Wait until it is ready (up to ~180 s):
kubectl --kubeconfig "${KUBECONFIG_MGMT}" \
get authoidcclient "${CLUSTER_NAME}-kubeflow" -n "${CLUSTER_NAME}" \
-o jsonpath='{.status.ready}{"\n"}'
Extract the parameters:
SECRET_NAME="$(kubectl --kubeconfig "${KUBECONFIG_MGMT}" \
get authoidcclient "${CLUSTER_NAME}-kubeflow" -n "${CLUSTER_NAME}" \
-o jsonpath='{.status.clientSecretRef.name}')"
SECRET_NS="$(kubectl --kubeconfig "${KUBECONFIG_MGMT}" \
get authoidcclient "${CLUSTER_NAME}-kubeflow" -n "${CLUSTER_NAME}" \
-o jsonpath='{.status.clientSecretRef.namespace}')"
export OIDC_CLIENT_ID="$(kubectl --kubeconfig "${KUBECONFIG_MGMT}" \
get secret "${SECRET_NAME}" -n "${SECRET_NS}" \
-o jsonpath='{.data.client_id}' | base64 -d)"
export OIDC_CLIENT_SECRET="$(kubectl --kubeconfig "${KUBECONFIG_MGMT}" \
get secret "${SECRET_NAME}" -n "${SECRET_NS}" \
-o jsonpath='{.data.client_secret}' | base64 -d)"
export OIDC_ISSUER_URL="$(kubectl --kubeconfig "${KUBECONFIG_MGMT}" \
get authoidcclient "${CLUSTER_NAME}-kubeflow" -n "${CLUSTER_NAME}" \
-o jsonpath='{.status.clientInfo.issuerUrl}')"
| Parameter | Purpose | Where to get it | Where it is used |
|---|---|---|---|
OIDC_CLIENT_ID | Kubeflow OIDC client ID | Secret from status.clientSecretRef of AuthOidcClient <CLUSTER_NAME>-kubeflow in namespace <CLUSTER_NAME>: key client_id | step 2, kubeflow-step-1 |
OIDC_CLIENT_SECRET | Kubeflow OIDC client secret | the same Secret: key client_secret | step 2, kubeflow-step-1 |
OIDC_ISSUER_URL | platform URL | AuthOidcClient status: status.clientInfo.issuerUrl | step 2, kubeflow-step-1 |
<KUBEFLOW_LOGIN> | Kubeflow administrator login | user login from OIDC. By default oauth2-proxy takes the sub claim | kubeflow-step-4 installation, field user-namespace.profiles[].name |
Set <KUBEFLOW_LOGIN> in user-namespace.profiles[].name. You can omit owner: it matches name. If the login in the token is in preferred_username rather than sub, set oauth2-proxy.requestAuthentication.useridClaim: preferred_username. To sign in by email, set oauth2-proxy.requestAuthentication.useridClaim: email, and then owner must match the email.
Step 2. Install Kubeflow
Every action in this step is in the client cluster. Only the OIDC client from step 1 is created in the management cluster. Everything after that is in the client cluster.
Install Kubeflow with SSC kubeflow-step-0 through kubeflow-step-4. Start the services one after another in Auto mode, and wait until the previous step is Healthy.
Also apply SSP shturval-networking-for-istio for shturval-networking (Cilium). Kubeflow runs on Istio: a sidecar is added to pods and handles the pod network itself. By default Cilium treats itself as the only network plugin on the node and can intercept the same traffic. The SSP lets Cilium coexist with the Istio sidecar and keeps Cilium socket load balancing on the host only, not inside pods.
After installation the interface is available over HTTPS. The publication method is set in the kubeflow-step-2 customvalues: Ingress (nginx) at https://kubeflow.<commonName>/, or Gateway API (Cilium) at https://<hostname-Gateway>/. For Ingress, the request is accepted outside the cluster by an Ingress (ingressClassName: nginx) on host kubeflow.<commonName>, and inside the cluster it is sent to Service istio-ingressgateway port 8080. Gateway traffic also goes to istio-ingressgateway. The host, TLS, and backend are set in the kubeflow-step-2 specification. DNS must point to the entry point: for Ingress, the client cluster Ingress IP and host kubeflow.<commonName>; for Gateway, <IP-Gateway> and host <hostname-Gateway>.
2.1. ShturvalServicePatch for Cilium
- Switch to the client cluster.
- Import the SSP:
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServicePatch
metadata:
name: shturval-networking-for-istio
spec:
patchOrder: 100
customvalues:
socketLB:
hostNamespaceOnly: true
cni:
exclusive: false
shturvalServiceConfigName: shturval-networking
To check that the ShturvalServicePatch is applied: Installed services → shturval-networking → ShturvalServicePatch tab.
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" apply -f - <<'EOF'
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServicePatch
metadata:
name: shturval-networking-for-istio
spec:
patchOrder: 100
customvalues:
socketLB:
hostNamespaceOnly: true
cni:
exclusive: false
shturvalServiceConfigName: shturval-networking
EOF
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" get shturvalservicepatch shturval-networking-for-istio
2.2. Install Kubeflow
Repository shturval, namespace default for every service. Instance names must match the chart names: kubeflow-step-0 … kubeflow-step-4.
In kubeflow-step-2, choose how to publish Kubeflow: the Ingress or Gateway tab. For Gateway, create a CiliumLoadBalancerIPPool with a free IP before you install kubeflow-step-2. The chart does not allocate a Gateway address from someone else’s pool. The Gateway API controller in Cilium must be enabled: How to enable the Gateway API controller in Cilium.
- Services and repositories → Available charts, repository shturval. Work in the client cluster.
- Install
kubeflow-step-0: namespacedefault, mode Auto. No customvalues. These are the base CRDs. - Install
kubeflow-step-1(oauth2-proxy). Dependency:kubeflow-step-0. Mode Auto. In the specification, set the OIDC parameters from step 1 andcookie_secretfrom Prepare parameters:
oauth2-proxy:
oauth2Cfg:
oidc_issuer_url: "<OIDC_ISSUER_URL>"
redirect_url: https://kubeflow.<commonName>/oauth2/callback
oidc:
client_id: "<OIDC_CLIENT_ID>"
client_secret: "<OIDC_CLIENT_SECRET>"
cookie_secret: "<cookie_secret>"
For Gateway, set redirect_url to https://<hostname-Gateway>/oauth2/callback.
- Install
kubeflow-step-2(Pipelines, storage, and the entry point). Dependency:kubeflow-step-1. Mode Auto. In the specification, set the external MySQL and S3 with AWS IAM support, and leaveserviceNameempty. Use the entry-point block from the tab that matches your cluster.
If S3 uses HTTP, leave s3.ca.source empty (source: ""), as in the examples below. If it uses HTTPS, replace the s3.ca block with one of these:
s3.ca when the cluster already has a ConfigMap with the root CA:
platform-agnostic-mutli-user:
s3:
ca:
source: configMap
name: "<S3_CA_CONFIGMAP>"
key: "ca.crt"
create: false
s3.ca when the cluster already has a Secret with the root CA:
platform-agnostic-mutli-user:
s3:
ca:
source: secret
name: "<S3_CA_SECRET>"
key: "ca.crt"
create: false
s3.ca when the chart should create a ConfigMap with the root CA:
platform-agnostic-mutli-user:
s3:
ca:
source: configMap
name: s3-ca-cert
key: ca.crt
create: true
cert: |
-----BEGIN CERTIFICATE-----
...
-----END CERTIFICATE-----
platform-agnostic-mutli-user:
seaweedfs:
enabled: false
mysql:
enabled: false
external:
host: "<KFP_MYSQL_HOST>"
port: <KFP_MYSQL_PORT>
pipelineDatabase: "<KFP_MYSQL_PIPELINE_DB>"
metadataDatabase: "<KFP_MYSQL_METADATA_DB>"
username: "<KFP_MYSQL_USER>"
password: "<KFP_MYSQL_PASSWORD>"
secretName: "mysql-secret"
serviceName: ""
pipelinesProfileController:
env:
awsEndpointUrl: "<KFP_AWS_IAM_ENDPOINT>"
s3EndpointUrl: "<KFP_S3_ENDPOINT>"
awsRegion: "<KFP_AWS_REGION>"
s3Bucket: "<KFP_S3_BUCKET>"
awsCredentials:
accessKeyValue: "<KFP_AWS_ACCESS_KEY>"
secretKeyValue: "<KFP_AWS_SECRET_KEY>"
s3:
ca:
source: "" # HTTP
exposure: ingress
ingress:
annotations:
cert-manager.io/cluster-issuer: "<CERT_CLUSTER_ISSUER>"
cert-manager.io/revision-history-limit: "5"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
ingressClassName: nginx
rules:
- host: kubeflow.<commonName>
http:
paths:
- backend:
service:
name: istio-ingressgateway
port:
number: 8080
path: /
pathType: Prefix
tls:
- hosts:
- kubeflow.<commonName>
secretName: kubeflow-ingress-tls
Create the pool first. The IP in addresses must be a free address from this pool. If the pool has a serviceSelector, it must allow the Gateway Service kubeflow in namespace istio-system.
Build hostname from the Gateway IP, not from the Ingress commonName. With the scheme *.<CLUSTER_NAME>.ip-<VIP>.shturval.link this is kubeflow.<CLUSTER_NAME>.ip-<IP-Gateway>.shturval.link (replace dots in the IP with hyphens). Use the same host in oauth2-proxy.oauth2Cfg.redirect_url of kubeflow-step-1: https://<hostname-Gateway>/oauth2/callback.
Import the pool manifest:
apiVersion: cilium.io/v2
kind: CiliumLoadBalancerIPPool
metadata:
name: kubeflow-gateway-vip
spec:
disabled: false
blocks:
- start: "<IP-Gateway>"
stop: "<IP-Gateway>"
Then set the kubeflow-step-2 customvalues:
platform-agnostic-mutli-user:
seaweedfs:
enabled: false
mysql:
enabled: false
external:
host: "<KFP_MYSQL_HOST>"
port: <KFP_MYSQL_PORT>
pipelineDatabase: "<KFP_MYSQL_PIPELINE_DB>"
metadataDatabase: "<KFP_MYSQL_METADATA_DB>"
username: "<KFP_MYSQL_USER>"
password: "<KFP_MYSQL_PASSWORD>"
secretName: "mysql-secret"
serviceName: ""
pipelinesProfileController:
env:
awsEndpointUrl: "<KFP_AWS_IAM_ENDPOINT>"
s3EndpointUrl: "<KFP_S3_ENDPOINT>"
awsRegion: "<KFP_AWS_REGION>"
s3Bucket: "<KFP_S3_BUCKET>"
awsCredentials:
accessKeyValue: "<KFP_AWS_ACCESS_KEY>"
secretKeyValue: "<KFP_AWS_SECRET_KEY>"
s3:
ca:
source: "" # HTTP
exposure: gateway
gateway:
addresses:
- type: IPAddress
value: "<IP-Gateway>"
create: true
gatewayClassName: cilium
hostname: <hostname-Gateway>
httpRoute:
backend:
name: istio-ingressgateway
port: 80
name: kubeflow
namespace: istio-system
tls:
clusterIssuer: "<CERT_CLUSTER_ISSUER>"
revisionHistoryLimit: "5"
secretName: kubeflow-ingress-tls
- Install
kubeflow-step-3(Katib, Dashboard, branding, and localization). Dependency:kubeflow-step-2. Mode Auto. Specification:
katib:
mysql:
enabled: false
external:
host: "<KATIB_MYSQL_HOST>"
port: <KATIB_MYSQL_PORT>
database: "<KATIB_MYSQL_DB>"
username: "<KATIB_MYSQL_USER>"
password: "<KATIB_MYSQL_PASSWORD>"
secretName: "<KATIB_MYSQL_SECRET_NAME>"
serviceName: ""
centraldashboard:
branding:
enabled: true
title: "Штурвал"
tagline: "ML/AI"
localization:
enabled: true
locale: ru-RU
- Install
kubeflow-step-4(Trainer, Spark Operator, the administrator profile, and Hub). Dependency:kubeflow-step-3. Mode Auto. Set the administrator profile and the Hub PVC sizes. Put<KUBEFLOW_LOGIN>inname. Wait until the service is Healthy.
user-namespace:
profiles:
- kind: User
name: admin
hub:
db:
pvc:
storageSize: 10Gi
hub-catalog:
postgres:
pvc:
storageSize: 5Gi
- Wait until
kubeflow-step-0…kubeflow-step-4are Healthy. If a service stays in another state for a long time, find the cause: Troubleshooting. Do not recreate steps that are already ready.
Set spec.dependency in the GUI on the Manifest tab, or import the whole SSC YAML.
Check:
- Services and repositories → Installed services.
kubeflow-step-0…kubeflow-step-4are in mode Auto and state Healthy. - Namespaces
kubeflow,kubeflow-system, andkflow-user-admin-namespacehave the labelistio-injection=enabled. If the label is missing, see troubleshooting. - When
kubeflow-step-3is installed, the configuration lineistio-injection: "enabled"is written to ConfigMapprofiles-namespace-labels-data-<random-suffix>. Both profiles fromuser-namespace.profilesand profiles created byprofiles-controllerreceive the label. Do not edit the ConfigMap by hand: the SSC operator rolls the change back during reconciliation. If the build is older and the line is missing from the ConfigMap, set the label on the profile namespace:istio-injection=enabled. If pods are already running, recreate them so the sidecar is added. - In a browser, open the entry-point URL:
https://kubeflow.<commonName>/for Ingress, orhttps://<hostname-Gateway>/for Gateway. The platform sign-in (SSO) should open, then the Kubeflow Dashboard. If the page does not open, check DNS:kubeflow.<commonName>to the Ingress address, or<hostname-Gateway>to<IP-Gateway>. With branding enabled, the browser tab title is «Штурвал» and the locale is Russian. - Model Registry pods are running in namespace
kflow-user-admin-namespace. Podsmodel-catalog-serverandmodel-catalog-postgresare running in namespacekubeflow.
Apply the SSCs one at a time: first kubeflow-step-0, wait until it is Healthy, then the next one.
kubeflow-step-0 — base CRDs and components, without OIDC.
kubeflow-step-1 — oauth2-proxy. OIDC parameters from step 1 and cookie_secret from Prepare parameters. For Gateway, redirect_url is https://<hostname-Gateway>/oauth2/callback.
kubeflow-step-2 — Pipelines, storage, and the entry point. Leave serviceName empty. The object storage must support AWS IAM. If S3 uses HTTP, leave s3.ca.source empty. If it uses HTTPS, replace the s3.ca block with the examples on the GUI tab. The entry-point block is on the Ingress or Gateway tab.
kubeflow-step-3 — Katib, Dashboard, branding, and localization.
kubeflow-step-4 — Trainer, Spark Operator, the administrator profile, and Hub. Set <KUBEFLOW_LOGIN> in name.
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServiceConfig
metadata:
name: kubeflow-step-0
spec:
chart: kubeflow-step-0
mode: auto
namespace: default
reponame: shturval
version: 2.15.0
---
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServiceConfig
metadata:
name: kubeflow-step-1
spec:
chart: kubeflow-step-1
customvalues:
oauth2-proxy:
oauth2Cfg:
oidc_issuer_url: "<OIDC_ISSUER_URL>"
redirect_url: https://kubeflow.<commonName>/oauth2/callback
oidc:
client_id: "<OIDC_CLIENT_ID>"
client_secret: "<OIDC_CLIENT_SECRET>"
cookie_secret: "<cookie_secret>"
dependency:
- kubeflow-step-0
mode: auto
namespace: default
reponame: shturval
version: 2.15.0
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServiceConfig
metadata:
name: kubeflow-step-2
spec:
chart: kubeflow-step-2
customvalues:
platform-agnostic-mutli-user:
seaweedfs:
enabled: false
mysql:
enabled: false
external:
host: "<KFP_MYSQL_HOST>"
port: <KFP_MYSQL_PORT>
pipelineDatabase: "<KFP_MYSQL_PIPELINE_DB>"
metadataDatabase: "<KFP_MYSQL_METADATA_DB>"
username: "<KFP_MYSQL_USER>"
password: "<KFP_MYSQL_PASSWORD>"
secretName: "mysql-secret"
serviceName: ""
pipelinesProfileController:
env:
awsEndpointUrl: "<KFP_AWS_IAM_ENDPOINT>"
s3EndpointUrl: "<KFP_S3_ENDPOINT>"
awsRegion: "<KFP_AWS_REGION>"
s3Bucket: "<KFP_S3_BUCKET>"
awsCredentials:
accessKeyValue: "<KFP_AWS_ACCESS_KEY>"
secretKeyValue: "<KFP_AWS_SECRET_KEY>"
s3:
ca:
source: "" # HTTP
exposure: ingress
ingress:
annotations:
cert-manager.io/cluster-issuer: "<CERT_CLUSTER_ISSUER>"
cert-manager.io/revision-history-limit: "5"
nginx.ingress.kubernetes.io/ssl-redirect: "false"
ingressClassName: nginx
rules:
- host: kubeflow.<commonName>
http:
paths:
- backend:
service:
name: istio-ingressgateway
port:
number: 8080
path: /
pathType: Prefix
tls:
- hosts:
- kubeflow.<commonName>
secretName: kubeflow-ingress-tls
dependency:
- kubeflow-step-1
mode: auto
namespace: default
reponame: shturval
version: 2.15.0
Create the pool before SSC kubeflow-step-2. The IP in addresses is a free address from this pool. hostname is the host that contains the Gateway IP (<hostname-Gateway>), not kubeflow.<commonName>. Use the same host in redirect_url of kubeflow-step-1.
apiVersion: cilium.io/v2
kind: CiliumLoadBalancerIPPool
metadata:
name: kubeflow-gateway-vip
spec:
disabled: false
blocks:
- start: "<IP-Gateway>"
stop: "<IP-Gateway>"
---
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServiceConfig
metadata:
name: kubeflow-step-2
spec:
chart: kubeflow-step-2
customvalues:
platform-agnostic-mutli-user:
seaweedfs:
enabled: false
mysql:
enabled: false
external:
host: "<KFP_MYSQL_HOST>"
port: <KFP_MYSQL_PORT>
pipelineDatabase: "<KFP_MYSQL_PIPELINE_DB>"
metadataDatabase: "<KFP_MYSQL_METADATA_DB>"
username: "<KFP_MYSQL_USER>"
password: "<KFP_MYSQL_PASSWORD>"
secretName: "mysql-secret"
serviceName: ""
pipelinesProfileController:
env:
awsEndpointUrl: "<KFP_AWS_IAM_ENDPOINT>"
s3EndpointUrl: "<KFP_S3_ENDPOINT>"
awsRegion: "<KFP_AWS_REGION>"
s3Bucket: "<KFP_S3_BUCKET>"
awsCredentials:
accessKeyValue: "<KFP_AWS_ACCESS_KEY>"
secretKeyValue: "<KFP_AWS_SECRET_KEY>"
s3:
ca:
source: "" # HTTP
exposure: gateway
gateway:
addresses:
- type: IPAddress
value: "<IP-Gateway>"
create: true
gatewayClassName: cilium
hostname: <hostname-Gateway>
httpRoute:
backend:
name: istio-ingressgateway
port: 80
name: kubeflow
namespace: istio-system
tls:
clusterIssuer: "<CERT_CLUSTER_ISSUER>"
revisionHistoryLimit: "5"
secretName: kubeflow-ingress-tls
dependency:
- kubeflow-step-1
mode: auto
namespace: default
reponame: shturval
version: 2.15.0
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServiceConfig
metadata:
name: kubeflow-step-3
spec:
chart: kubeflow-step-3
customvalues:
katib:
mysql:
enabled: false
external:
host: "<KATIB_MYSQL_HOST>"
port: <KATIB_MYSQL_PORT>
database: "<KATIB_MYSQL_DB>"
username: "<KATIB_MYSQL_USER>"
password: "<KATIB_MYSQL_PASSWORD>"
secretName: "<KATIB_MYSQL_SECRET_NAME>"
serviceName: ""
centraldashboard:
branding:
enabled: true
title: "Штурвал"
tagline: "ML/AI"
localization:
enabled: true
locale: ru-RU
dependency:
- kubeflow-step-2
mode: auto
namespace: default
reponame: shturval
version: 2.15.0
---
apiVersion: ops.shturval.tech/v1beta2
kind: ShturvalServiceConfig
metadata:
name: kubeflow-step-4
spec:
chart: kubeflow-step-4
customvalues:
user-namespace:
profiles:
- kind: User
name: admin
hub:
db:
pvc:
storageSize: 10Gi
hub-catalog:
postgres:
pvc:
storageSize: 5Gi
dependency:
- kubeflow-step-3
mode: auto
namespace: default
reponame: shturval
version: 2.15.0
For Gateway, apply CiliumLoadBalancerIPPool first. Then apply the documents one at a time: kubeflow-step-0, and after it is Healthy, kubeflow-step-1, and so on. After each step:
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" wait \
--for=jsonpath='{.status.ready}'=true ssc/kubeflow-step-0 --timeout=900s
In the wait command, substitute the name of the SSC you just applied.
When all five SSCs are Healthy:
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" get ssc \
kubeflow-step-0 kubeflow-step-1 kubeflow-step-2 kubeflow-step-3 kubeflow-step-4
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" get pods -n kubeflow
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" get pods -n kubeflow-system
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" get pods -n kflow-user-admin-namespace
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" get ns kubeflow kubeflow-system kflow-user-admin-namespace \
-o jsonpath='{range .items[*]}{.metadata.name}{" "}{.metadata.labels.istio-injection}{"\n"}{end}'
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" get pods -A | grep -v "Running\|Completed"
The expected istio-injection label is enabled on namespaces kubeflow, kubeflow-system, and kflow-user-admin-namespace.
Check the namespace of a new profile:
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" get ns kflow-user-<profile>-namespace \
-o jsonpath='{.metadata.labels.istio-injection}{"\n"}'
The expected value is enabled. If the kubeflow-step-3 build is older and the label is missing, set it on the namespace and recreate the profile pods that are already running:
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" label namespace \
kflow-user-<profile>-namespace istio-injection=enabled
Check the Dashboard branding:
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" -n kubeflow get cm dashboard-branding \
-o jsonpath='{.data.index\.html}' | grep -o '<title>[^<]*</title>'
With branding enabled, the expected title is <title>Штурвал</title>.
Check Hub:
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" get pods -n kflow-user-admin-namespace
kubectl --kubeconfig "${KUBECONFIG_CLIENT}" -n kubeflow get pods | grep model-catalog
Model Registry pods must be running in kflow-user-admin-namespace. In kubeflow, model-catalog-server and model-catalog-postgres must be running.
Next:
- if you need it — External access to KServe;
- Kubeflow profiles;
- Troubleshooting.