Install Portworx Cluster on Kubernetes(on-premise)
Contents
Prepare hosts with storage
Portworx (PX) requires at least some nodes in the cluster to have dedicated storage for Portworx to use. PX will then carve out virtual volumes from these storage pools. In this example, we use a 3.3T block device that exists on each node.
List block devices on worker nodes
1 | $ lsblk |
Note the storage device sdb, which will be used by PX as one of it’s raw block disks. All the nodes in this setup have the sdb device.
Generate the specs
Get Kubernetes Version:
1 | kubectl version --short | awk -Fv '/Server Version: / {print $3}' |
Portworx will create and manage an internal key-value store (kvdb) cluster.
You can restrict the nodes that will run the key-value store by labelling your nodes with the label px/metadata-node=true. Only the nodes with the label will participate in the kvdb cluster. This allows you to use nodes with dedicated hardware for the key-value store.
For example:
1 | kubectl label nodes node1 node2 node3 px/metadata-node=true (labeled) |
Apply the specs
1 | kubectl create secret generic registrykey --from-file=.dockerconfigjson=.docker/config.json --type=kubernetes.io/dockerconfigjson -n kube-system |
NOTE
: portworx/px-enterprise:2.1.5 image is need to be.
Monitor the portworx pods
1 | kubectl get pods -o wide -n kube-system -l name=portworx |
Monitor Portworx cluster status
1 | PX_POD=$(kubectl get pods -l name=portworx -n kube-system -o jsonpath='{.items[0].metadata.name}') |
1 | Status: PX is operational |
Author: Acqua
Link: https://acquaai.github.io/2019/09/19/install-ha-portworx-k8s/
License: 知识共享署名-非商业性使用 4.0 国际许可协议