Skip to content

Files

Latest commit

Jun 2, 2022
1d5b47f · Jun 2, 2022

History

History
101 lines (75 loc) · 3.07 KB

install.md

File metadata and controls

101 lines (75 loc) · 3.07 KB

Installation

This section provides detailed information about Kubeflow deployment on vSphere with Tanzu.

Setup TKG cluster

Install vSphere with Tanzu

If vSphere with Tanzu is not installed and configured yet, see vSphere with Tanzu Configuration and Management

Create namespace

Refer to Create and Configure a vSphere Namespace to create a namespace.

Setup content library for Tanzu Kubernetes Cluster OVF and OVA templates

OVF and OVA templates address.

Download and install Kubernetes CLI tools for vSphere

Create a jumpbox VM for later use

# Create jumpbox for later config usage
cat <<EOF | kubectl apply -f -
apiVersion: v1
kind: Pod
metadata:
  name: jumpbox
  namespace: xyz                              # REPLACE
spec:
  containers:
  - image: "photon:3.0"
    name: jumpbox
    command: [ "/bin/bash", "-c", "--" ]
    args: [ "yum install -y openssh-server; mkdir /root/.ssh; cp /root/ssh/ssh-privatekey /root/.ssh/id_rsa; chmod 600 /root/.ssh/id_rsa; while true; do sleep 30; done;" ]
    volumeMounts:
      - mountPath: "/root/ssh"
        name: ssh-key
        readOnly: true
    resources:
      requests:
        memory: 2Gi
  volumes:
    - name: ssh-key
      secret:
        secretName: tkgs-cluster-01-ssh       # REPLACE
EOF

Deploy and configure TKG cluster for Kubeflow

Use the script provided by this project to provision and configure TKG cluster.

Verification

# login supervisor cluster
kubectl vsphere login --server=$server --vsphere-username [email protected] --insecure-skip-tls-verify
# check cluster status
kubectl get tkc <cluster-name>

# login tkg cluster
kubectl vsphere login --server=$server --vsphere-username [email protected] --insecure-skip-tls-verify --tanzu-kubernetes-cluster-namespace=<namespace> --tanzu-kubernetes-cluster-name=<cluster-name>
# check node status
kubectl get nodes -owide

Deploy Kubeflow

Install Kubeflow 1.4 on TKG cluster

# download script and manifest for deployment
git clone https://github.com/liuqi/kubeflow-on-vsphere.git
# update the parameters and run the script
sh ./kubeflow-deployer-individual.sh

Verification

# check pods status
# login TKG cluster
kubectl vsphere login --server=$server --vsphere-username [email protected] --insecure-skip-tls-verify --tanzu-kubernetes-cluster-namespace=<namespace> --tanzu-kubernetes-cluster-name=<cluster-name>

# ensure pod status is running
kubectl get pods -A

Access Kubeflow dashboard via port-forward

# port forward istio ingress gateway to local port 8080
kubectl port-forward svc/istio-ingressgateway -n istio-system 8080:80

Access Kubeflow central dashboard via browser (http://localhost:8080). Login with the default user's credential ([email protected] / 12341234).