Install on Kubernetes with Docker EE


This document explains how to install Portworx with Kubernetes on Docker EE 2.x.

Prerequisites

You must have Docker EE 2.x running with configured Kubernetes cluster.

Non-Kubernetes users: To install stand-alone Portworx on Docker EE 2.x follow this doc.

Install Docker EE 2.x

Follow Docker documentation to install Docker EE 2.x https://docs.docker.com/install/linux/docker-ee/centos.

Deploy UCP

Select UCP version

Follow Docker documentation to install UCP https://docs.docker.com/ee/ucp/admin/install.

Note that UCP version must be 3.1.x or higher for RBAC compatability https://docs.docker.com/ee/ucp/release-notes.

Install UCP

Here is an example command to install UCP 3.1.2.

docker image pull docker/ucp:3.1.2
docker container run --rm -it --name ucp -v /var/run/docker.sock:/var/run/docker.sock docker/ucp:3.1.2 install --host-address <node-ip> --interactive
NOTE: Do not init swarm, UCP with do that for you.

Login to UCP

Use the credentials to login to UCP Dashboard, example: admin/password.

https://<node-ip>:443

Configure kubernetes environment

Check your Kubernetes version

Navigate to Admin -> About -> Kubernetes and look for GoVersion.

https://<node-ip>/manage/about/kubernetes

Get K8S Version

Install kubectl

Follow Kubernetes documentation to install kubectl package https://kubernetes.io/docs/tasks/tools/install-kubectl/#install-kubectl.

Generate new client bundle

Navigate to Admin -> My Profile -> Client Bundles and select Generate New Client Bundle from dropdown menu.

https://<node-ip>/manage/profile/clientbundle

Generate New Client Bundle

Download Client Bundle and set env

Install unzip and use it to unpackage bundle.

yum install -y unzip
unzip ucp-bundle-admin.zip
eval "$(<env.sh)"

Now use kubectl to get nodes.

kubectl get nodes -o wide

Install Portworx

Generate the specs

To install Portworx with Kubernetes, you must first generate Kubernetes manifests that you will deploy in your cluster:

  1. Navigate to PX-Central and log in, or create an account
  2. Select Install and Run to open the Spec Generator

    Screenshot showing install and run

  3. Select New Spec

    Screenshot showing new spec button

Portworx can also be installed using it’s Helm chart by following instructions here. The above method is recommended over helm as the wizard will guide you based on your environment.

Apply the specs

Apply the generated specs to your cluster.

kubectl apply -f px-spec.yaml
Monitor the Portworx pods

Wait till all Portworx pods show as ready in the below output:

kubectl get pods -o wide -n kube-system -l name=portworx
Monitor Portworx cluster status
PX_POD=$(kubectl get pods -l name=portworx -n kube-system -o jsonpath='{.items[0].metadata.name}')
kubectl exec $PX_POD -n kube-system -- /opt/pwx/bin/pxctl status

Post-Install

Once you have a running Portworx installation, below sections are useful.


Last edited: Thursday, Dec 12, 2019