Installing K10 on kind

Prerequisites

Warning

It is possible to install K10 in kind (Kubernetes IN Docker) for a quick evaluation but this environment tends to be resource constrained and is only appropriate for light experimentation.

To install K10 in kind, the install prerequisites need to be met, the Snapshot Controller installed, and the at least one CSI-based storage system that supports snapshots needs to be installed. We recommend:

  • kind v0.8.1 or higher

  • Kubernetes v1.17 or higher

  • VolumeSnapshot beta CRDs and the Snapshot Controller

  • The CSI Hostpath Driver.

Installing kind Prerequisites

The above requirements can be easily met by executing the following commands:

  • Install Kubernetes with kind

    # Create a Kubernetes v1.18 with kind
    $ kind create cluster --name k10-demo --image kindest/node:v1.18.2 --wait 600s
    
  • Install the VolumeSnapshot CRDS and the Snapshot Controller

    # Install a recent version of the CSI snapshotter
    $ SNAPSHOTTER_VERSION=v2.1.1
    
    # Apply VolumeSnapshot CRDs
    $ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${SNAPSHOTTER_VERSION}/config/crd/snapshot.storage.k8s.io_volumesnapshotclasses.yaml
    $ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${SNAPSHOTTER_VERSION}/config/crd/snapshot.storage.k8s.io_volumesnapshotcontents.yaml
    $ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${SNAPSHOTTER_VERSION}/config/crd/snapshot.storage.k8s.io_volumesnapshots.yaml
    
    # Create Snapshot Controller
    $ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${SNAPSHOTTER_VERSION}/deploy/kubernetes/snapshot-controller/rbac-snapshot-controller.yaml
    $ kubectl apply -f https://raw.githubusercontent.com/kubernetes-csi/external-snapshotter/${SNAPSHOTTER_VERSION}/deploy/kubernetes/snapshot-controller/setup-snapshot-controller.yaml
    
  • Install the CSI Hostpath Driver

    $ git clone https://github.com/kubernetes-csi/csi-driver-host-path.git
    $ cd csi-driver-host-path
    $ ./deploy/kubernetes-1.18/deploy.sh
    
  • After the install is complete, add the CSI Hostpath Driver StorageClass and make it the default

    $ kubectl apply -f ./examples/csi-storageclass.yaml
    $ kubectl patch storageclass standard \
        -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"false"}}}'
    $ kubectl patch storageclass csi-hostpath-sc \
        -p '{"metadata": {"annotations":{"storageclass.kubernetes.io/is-default-class":"true"}}}'
    

Installing K10

K10 can now be installed and configured using the following commands.

$ helm install kasten/k10 --name=k10 --namespace=kasten-io

# Annotate the CSI Hostpath VolumeSnapshotClass for use with K10
$ kubectl annotate volumesnapshotclass csi-hostpath-snapclass \
    k10.kasten.io/is-snapshot-class=true
$ helm install k10 kasten/k10 --namespace=kasten-io

# Annotate the CSI Hostpath VolumeSnapshotClass for use with K10
$ kubectl annotate volumesnapshotclass csi-hostpath-snapclass \
    k10.kasten.io/is-snapshot-class=true

Validating the Install

To validate that K10 has been installed properly, the following command can be run in K10's namespace (the install default is kasten-io) to watch for the status of all K10 pods:

$ kubectl get pods --namespace kasten-io --watch

It may take a couple of minutes for all pods to come up but all pods should ultimately display the status of Running.

$ kubectl get pods --namespace kasten-io
NAMESPACE     NAME                                    READY   STATUS    RESTARTS   AGE
kasten-io     aggregatedapis-svc-b45d98bb5-w54pr      1/1     Running   0          1m26s
kasten-io     auth-svc-8549fc9c59-9c9fb               1/1     Running   0          1m26s
kasten-io     catalog-svc-f64666fdf-5t5tv             2/2     Running   0          1m26s
...

In the unlikely scenario that pods that are stuck in any other state, please follow the support documentation to debug further.

Validate Dashboard Access

By default, the K10 dashboard will not be exposed externally. To establish a connection to it, use the following kubectl command to forward a local port to the K10 ingress port:

$ kubectl --namespace kasten-io port-forward service/gateway 8080:8000

The K10 dashboard will be available at http://127.0.0.1:8080/k10/#/.

For a complete list of options for accessing the Kasten K10 dashboard, you can use the instructions here.