Install Stork
If you are planning to install or upgrade Stork in an air-gapped environment, you must also pull the kopiaexecutor and nfsexecutor images for your Stork version and push them to your custom image registry. For the full list of versioned images, see Install Stork in air-gapped environments.
You can install Stork with Portworx Backup on your Kubernetes cluster with or without Portworx Enterprise.
For information about Stork, Portworx Backup, and Portworx Enterprise versions that are compatible with each other, see compatibility matrix.
Deploy Stork without installing Portworx Enterprise
To install Stork with Portworx Backup on your Kubernetes cluster without installing Portworx Enterprise, perform the following tasks.
-
Download the Stork spec (
stork-spec.yaml):curl -fsL -o stork-spec.yaml "https://install.portworx.com/pxbackup?comp=stork&storkNonPx=true" -
In the
stork-spec.yaml, change the Stork version to the one compatible with your Portworx Backup version if the version differs.
If your application cluster is running in the IBM Cloud environment, ensure that the image repository path is set to icr.io/ext/portworx/stork:<supported-pxb-stork-version> before applying the stork-spec.yaml during Stork installation (without Portworx Enterprise).
-
Apply the
stork-spec.yamlto install the latest Stork version:kubectl apply -f stork-spec.yaml
Deploy Stork along with Portworx Enterprise
To install Stork along with Portworx Enterprise, you can opt for DaemonSet installation or Portworx Operator installation:
Portworx DaemonSet installation
To install Stork using the DaemonSet installation method:
-
Fetch the Kubernetes version and then download
stork-spec.yaml:KBVER=$(kubectl version | awk -Fv '/Server Version: /{print $3}')
curl -fsL -o stork-spec.yaml "https://install.portworx.com/pxbackup?kbver=${KBVER}&comp=stork"noteOn Kubernetes 1.28 and later,
kubectl versionoutputs version strings in a different format (for example,v1.28.0), which may cause theawkparsing expression to extract an emptyKBVERvalue. IfKBVERis empty, retrieve the server version directly and set it manually:KBVER=$(kubectl version -o json | python3 -c "import sys,json; v=json.load(sys.stdin)['serverVersion']; print(v['major']+'.'+v['minor'])") -
Apply the
stork-spec.yaml:kubectl apply -f stork-spec.yaml
Portworx Operator installation
Stork fresh installation for Portworx Backup through web console
If Stork is not installed as part of Portworx deployment, perform the following steps:
-
Access Portworx Backup web console.
-
From the home page, click Add cluster.
-
Choose your Kubernetes platform.
-
Provide cluster name and Kubeconfig details.
-
Click Px-cluster to copy the stork installation command.
-
Run the Stork installation command.
noteIf Stork is installed through the PX Cluster option from the web console in a Namespace other than the Namespace where Portworx Enterprise is deployed, perform step 6; otherwise go to step 7.
-
Update the following key-value pairs in the Stork Deployment's (
stork-spec.yaml) environment variable section, using thekubectl editcommand:kubectl edit deployment stork -n <stork-namespace>env:
- name: PX_NAMESPACE
value: <portworx-namespace>
- name: PX_SERVICE_NAME
value: portworx-api
- name: STORK_NAMESPACE
value: portworx -
Click Add Cluster.
Updating Stork deployment for Portworx Backup through web console
Perform the following steps to update Stork installation using the Portworx Operator option:
-
Edit the stc (Kubernetes resource):
kubectl edit stc -n <portworx-namespace> -
Append the Stork image and version details in Stork section:
stork:
args:
webhook-controller: "true"
enabled: true
image: openstorage/stork:<Variable name="stork_3.0.0"/> -
Save and exit.
Install Stork in air-gapped environments
-
If your application cluster is air-gapped, you must pull the following images before installing Stork. See the compatibility matrix for supported versions of Stork:
- 26.3.0
- 26.2.0
- 25.6.1
- 25.5.0
- 25.4.0
Stork Image Version Stork openstorage/stork 26.3.0 Command Executor openstorage/cmdexecutor 26.3.0 NFS Executor openstorage/nfsexecutor 1.2.24 Kopia Executor openstorage/kopiaexecutor 1.2.24 Stork Image Version Stork openstorage/stork 26.2.0 Command Executor openstorage/cmdexecutor 26.2.0 NFS Executor openstorage/nfsexecutor 1.2.23 Kopia Executor openstorage/kopiaexecutor 1.2.23 Stork Image Version Stork openstorage/stork 25.6.1 Command Executor openstorage/cmdexecutor 25.5.0 NFS Executor openstorage/nfsexecutor 1.2.22 Kopia Executor openstorage/kopiaexecutor 1.2.22 Stork Image Version Stork openstorage/stork 25.5.0 Command Executor openstorage/cmdexecutor 25.5.0 NFS Executor openstorage/nfsexecutor 1.2.22 Kopia Executor openstorage/kopiaexecutor 1.2.22 Stork Image Version Stork openstorage/stork 25.4.0 Command Executor openstorage/cmdexecutor 25.4.0 NFS Executor openstorage/nfsexecutor 1.2.21 Kopia Executor openstorage/kopiaexecutor 1.2.21 notenfsExecutorandkopiaExecutorversion 1.2.20 are not released or supported in Stork. -
Push the above images to your internal registry server, accessible by the air-gapped nodes.
-
After pushing the images, follow the installation instructions in the Deploy Stork without installing Portworx Enterprise or Deploy Stork along with Portworx Enterprise section based on your deployment method to install your Stork version.
Sample Stork spec for reference
---
apiVersion: v1
kind: ServiceAccount
metadata:
name: stork-account
namespace: <stork-namespace>
---
apiVersion: apps/v1
kind: Deployment
metadata:
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ""
labels:
tier: control-plane
name: stork
namespace: <stork-namespace>
spec:
selector:
matchLabels:
name: stork
strategy:
rollingUpdate:
maxSurge: 1
maxUnavailable: 1
type: RollingUpdate
replicas: 3
template:
metadata:
annotations:
scheduler.alpha.kubernetes.io/critical-pod: ""
labels:
name: stork
tier: control-plane
spec:
affinity:
podAntiAffinity:
requiredDuringSchedulingIgnoredDuringExecution:
- labelSelector:
matchExpressions:
- key: "name"
operator: In
values:
- stork
topologyKey: "kubernetes.io/hostname"
hostPID: false
containers:
- name: stork
command:
- /stork
- --verbose
- --leader-elect=true
- --health-monitor-interval=120
- --webhook-controller=true
image: icr.io/ext/portworx/stork:<your-stork-version>
imagePullPolicy: Always
resources:
requests:
cpu: '0.1'
serviceAccountName: stork-account
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: stork-scheduler-role
rules:
- apiGroups: [""]
resources: ["endpoints"]
verbs: ["get", "create", "update"]
- apiGroups: [""]
resources: ["configmaps"]
verbs: ["get", "list", "watch"]
- apiGroups: ["", "events.k8s.io"]
resources: ["events"]
verbs: ["create", "patch", "update"]
- apiGroups: [""]
resourceNames: ["kube-scheduler"]
resources: ["endpoints"]
verbs: ["delete", "get", "patch", "update"]
- apiGroups: [""]
resources: ["nodes", "namespaces"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["pods"]
verbs: ["delete", "get", "list", "watch"]
- apiGroups: [""]
resources: ["bindings", "pods/binding"]
verbs: ["create"]
- apiGroups: [""]
resources: ["pods/status"]
verbs: ["patch", "update"]
- apiGroups: [""]
resources: ["replicationcontrollers", "services"]
verbs: ["get", "list", "watch"]
- apiGroups: ["apps", "extensions"]
resources: ["replicasets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["apps"]
resources: ["statefulsets"]
verbs: ["get", "list", "watch"]
- apiGroups: ["policy"]
resources: ["poddisruptionbudgets"]
verbs: ["get", "list", "watch"]
- apiGroups: [""]
resources: ["persistentvolumeclaims", "persistentvolumes"]
verbs: ["get", "list", "watch", "update"]
- apiGroups: ["storage.k8s.io"]
resources: ["storageclasses", "csinodes"]
verbs: ["get", "list", "watch"]
- apiGroups: ["coordination.k8s.io"]
resources: ["leases"]
verbs: ["create", "update", "get", "list", "watch"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: stork-scheduler-role-binding
subjects:
- kind: ServiceAccount
name: stork-scheduler-account
namespace: <stork-namespace>
roleRef:
kind: ClusterRole
name: stork-scheduler-role
apiGroup: rbac.authorization.k8s.io
---
kind: StorageClass
apiVersion: storage.k8s.io/v1
metadata:
name: stork-snapshot-sc
provisioner: stork-snapshot
---
kind: ClusterRole
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: stork-role
rules:
- apiGroups: ["*"]
resources: ["*"]
verbs: ["*"]
---
kind: ClusterRoleBinding
apiVersion: rbac.authorization.k8s.io/v1
metadata:
name: stork-role-binding
subjects:
- kind: ServiceAccount
name: stork-account
namespace: <stork-namespace>
roleRef:
kind: ClusterRole
name: stork-role
apiGroup: rbac.authorization.k8s.io
Related Topics