Today’s dynamic market requires developers to have access to a programmable infrastructure to deploy and manage applications on demand. The secure, multi-tenant, programmable infrastructure provided by Kubernetes enables developers to deliver applications with greater velocity than ever before.

Just like Kubernetes, Portworx provides developers with an open source model called OpenStorage SDK to programmatically manage the application data services. Today, Portworx continues to innovate by providing pxc (pronounced like “pixie”), an open source kubectl plugin utilizing the programmable infrastructure from both Kubernetes and Portworx data services, giving developers a single, unified experience to query and manage their applications on Kubernetes with Portworx.

By being a kubectl plugin, pxc provides developers with many benefits. It fully integrates with kubectl, so it can leverage the kubeconfig file for both automatic configuration and for Portworx user credential references. Developers can also get more detailed information about their Kubernetes data services backed by Portworx. For example, developers can query information about their PVCs using pxc which will communicate with both infrastructures to merge their information and provide them with a single, comprehensive view:

$ kubectl pxc pvc list -n mysql
NAME        VOLUME                                    CAPACITY  SHARED  STATE     PODS
----        ------                                    --------  ------  -----     ----
mysql-data  pvc-fcb29944-44a4-4856-aa24-56665c754b06  2.0 GiB   false   on node0  mysql/mysql-69964c897-9v29l

pxc also leverages PX-Security authentication and authorization, securing multitenant access to Portworx services and volumes. Users can provide pxc with their authentication credentials simply by pointing to a Kubernetes secret containing their Portworx authentication information:

$ kubectl pxc login --k8s-secret-name=px-admin-token --k8s-secret-namespace=kube-system
Successfully saved login information in Kubeconfig

$ kubectl pxc config credentials whoami
Name: Luis Pabón
Email: luis@portworx.com
Subject: b35b4204-d29b-11ea-86da-ac1f6b221662
Groups: engineering
Roles: system.user
Issued At Time: Wed Jul 29 15:06:21 PDT 2020
Expiration Time: Mon Feb 22 22:06:21 PST 2021

Status: Ok

pxc also presents cluster administrators with the ability to communicate with their Portworx clusters from their client workstation. By being a kubectl plugin, pxc can securely and automatically communicate with Portworx deployed on their Kubernetes system. Here is an example of a cluster description:

$ kubectl pxc cluster describe                                                                       
Name: vin-px-iks118-vpcg2
UUID: 89d27dde-fc88-4c1b-8d2c-6dcd7b70811f
Status: Ready
Nodes:
Hostname                                 Version          Used     Capacity  Status  Kernel Version      OS
--------                                 -------          ----     --------  ------  --------------      --
kube-bsh9mgcd0vha9pga5mng-iks1-00000300  2.5.5.0-bef5691  8.0 GiB  100 GiB   Ready   4.15.0-111-generic  Ubuntu 18.04.4 LTS
kube-HtFo7tMzntoJFAG3xntM-iks1-00000300  2.5.5.0-bef5691  8.0 GiB  100 GiB   Ready   4.15.0-111-generic  Ubuntu 18.04.4 LTS
kube-nSp9KckKYbeTDJrXAdks-iks1-00000300  2.5.5.0-bef5691  8.0 GiB  100 GiB   Ready   4.15.0-111-generic  Ubuntu 18.04.4 LTS

Like kubectlpxc also supports its own plugins, called componentsComponents are extensions to pxc that can be provided by Portworx or by deployers to their users. Components provide a simple model to easily extend pxc on demand and without updating the pxc code itself. Like kubectl, components can be written in any language as they are applications called by pxc, but if they are written in Golang, a component gains the benefit of using pxc libraries for a better integration. For example, the cluster manager example component cm uses the pxc libraries to initialize any user credentials and to set up a connection to Portworx. In the example below, the cm component sends a request to the cluster to get its UUID and display it.

$ kubectl pxc cm --help
This is a short message from cm

Usage:
  cm [flags]
  cm [command]

Available Commands:
  help        Help about any command
  show        Describe a Portworx cluster
  uuid        Show cluster uuid
  version     Show version information

Flags:
  -h, --help      help for cm
  --options   Show global options for all commands

Use "cm [command] --help" for more information about a command.
Use "pxc --options" for a list of global command-line options (applies to all commands)

$ kubectl pxc cm uuid
6becde0f-132e-402c-99b5-6feb9e249977

To get pxc for Linux, MacOSX, or Windows WSL, simply use brew:

$ brew tap portworx/brew
$ brew install pxc

For more information, please checkout the pxc repo: https://github.com/portworx/pxc

Share
Subscribe for Updates

About Us
Portworx is the leader in cloud native storage for containers.

luis

Luis Pabón

Portworx | Member of Technical Staff
link
Blog Placeholder
October 5, 2015 News & Commentary
Missing: Application Aware Infrastructure
Eric Han
Eric Han
link
Twitter
October 4, 2019 Technical Insights
Application Migrations on Kubernetes with CockroachDB
Ryan Wallner
Ryan Wallner
link
Graphic-168
June 6, 2015 How To
Building an Application Defined Data Center Using Docker
Gou Rao
Gou Rao