Deploying Skydive to IBM Public Cloud Container Service

This post describes how to deploy Skydive, an open source real-time network topology and protocol analyzer, to the IBM Public Cloud Container Service, by using Helm Charts.

Ingredients

  • IBM® Cloud Container Service
  • IBM Skydive Helm Chart
The latest version of Skydive Helm Chart (Helm Chart version v1.0.1, Skydive version 0.17.1) can be found here

Step 1. Get access to IBM® Cloud Container Service

First, access the IBM Cloud Container Service.

– More information on the IBM Cloud Container Service is available here

Once you get your Kubernetes cluster up and running on the IBM Cloud Container Service, you should be able to access Kubernetes resources using the ‘kubectl’ command.

To install and use the IBM Cloud Container Service CLI, refer to Setting up the CLI and API

For example, to list ibm-system namespace pods from the command line, execute:

> export KUBECONFIG=/home/stack/.bluemix/plugins/container-service/clusters/istio/kube-config-dal13-istio.yml
> kubectl get pods -n ibm-system

You should see list of pods, similar to:

ibm-system namespace pods

Step 2. Deploy Skydive using Helm Chart

Next, deploy Skydive.

With IBM Cloud Container Service, you can install Skydive using the native “helm” command line as described below.

To use the “helm” command line option to install Skydive, you need a basic knowledge of Helm Charts, access to the Skydive Helm Chart, and values for the custom installation configuration using Helm install values. The following steps provide instructions.

Step 2.1 Deploy helm to the Kubernetes container cluster

From the command line, execute:

> helm init
$HELM_HOME has been configured at /root/.helm.
(Use --client-only to suppress this message, or --upgrade to upgrade Tiller to the current version.)
Happy Helming!
>

Helm is now deployed both locally and on the Kubernetes cluster (with pod name `Tiller`). You are now ready to deploy Charts!

Step 2.2 Access the IBM Helm chart repository

From the command line, execute:

> helm repo add ibm-charts https://raw.githubusercontent.com/IBM/charts/master/repo/stable/
"ibm-charts" has been added to your repositories

You should be able to see “ibm-skydive-dev” using the Helm search command:

> helm search ibm-charts | grep skydive
ibm-charts/ibm-skydive-dev                      1.0.1           latest          Skydive is an open source real-time network top...

Step 2.3 Install Skydive Helm chart

Next, install the Skydive Helm chart with configuration parameters for the IBM Cloud Container Service.

From the command line execute:

> helm install ibm-charts/ibm-skydive-dev --name=public --namespace=kube-system --set service.type=LoadBalancer

You should see output similar to the following:

Use ‘public’ as the ‘name’ option in the command line to deploy the Chart with a defined Helm release name. To see a current list of deployed Helm releases, execute the following command line:
> helm list
> NAME    REVISION        UPDATED                         STATUS          CHART                   NAMESPACE
public 1 Wed May 2 12:40:33 2018 DEPLOYED ibm-skydive-dev-1.0.1 kube-system
Use ‘kube-system’ as the ‘namespace’ option to deploy the Chart into a specific Kubernetes namespace. It is essential that you deploy Skydive into a ‘kube-system’ name to give Skydive pods the credentials they need to monitor infrastructure and Kubernetes resources.
Set ‘service.type’ to ‘LoadBalancer’ to use the IBM Container Cloud Service LoadBalancing capabilities and expose the Skydive UI end-point.
You can find additional information on Kubernetes LoadBalancing port usage under the IBM Container Cloud Service here.

A complete list of Skydive Helm Chart installation configuration parameters can be found under the Skydive Helm Chart configuration section.

Step 2.4 Access the Skydive UI

To get Skydive end-point information, execute the following from the command line:

> export UI_PORT=$(kubectl get --namespace kube-system -o jsonpath="{.spec.ports[0].nodePort}" services public-ibm-skydive-dev-service)
> export UI_IP=$(kubectl get --namespace kube-system -o jsonpath="{.status.loadBalancer.ingress[0].ip}" services public-ibm-skydive-dev-service)
> echo "skydive end-point: http://$UI_IP:$UI_PORT"
skydive end-point: http://169.48.123.45:12345

You can now launch your browser against the endpoint listed. This brings up the Skydive UI and allows full usage of Skydive features.

Skydive UI
Skydive has complete API and CLI capabilities that are accessible using the exact same end-point. For details refer to the Skydive documentation.
Uninstalling Skydive using Helm is simple. To delete the ‘public’ Helm release we just created, in the command line use helm delete -purge public

Step 3 . Using Skydive

Skydive is a feature rich framework, capable of providing extensive real-time and historical monitoring information, visual exploration, and broad networking troubleshooting capabilities such as packet injection and live bandwidth visualization.

Skydive provides a UI, a CLI, and an extensive REST API allowing both programmatic and human interaction.

  • Basic information on Skydive usage can be found here
  • Complete documentation can be found here
  • More information and tutorials can be found also here

Concluding remark

We hope you make good use of Skydive and enjoy the features and capabilities offered. We are looking for feedback and contributions, and invite you to use the community IRC channel or contact us directly about any issues.