https://mobb.ninja/docs/rosa/sts/
https://mobb.ninja/docs/misc/oadp/rosa-sts/
export CLUSTER_NAME=wdh07052023d
export ROSA_CLUSTER_ID=$(rosa describe cluster -c ${CLUSTER_NAME} --output json | jq -r .id)
export REGION=$(rosa describe cluster -c ${CLUSTER_NAME} --output json | jq -r .region.id)
export OIDC_ENDPOINT=$(oc get authentication.config.openshift.io cluster -o jsonpath='{.spec.serviceAccountIssuer}' | sed 's|^https://||')
export AWS_ACCOUNT_ID=`aws sts get-caller-identity --query Account --output text`
export CLUSTER_VERSION=`rosa describe cluster -c ${CLUSTER_NAME} -o json | jq -r .version.raw_id | cut -f -2 -d '.'`
export ROLE_NAME="${CLUSTER_NAME}-openshift-oadp-aws-cloud-credentials"
export AWS_PAGER=""
export SCRATCH="/tmp/${CLUSTER_NAME}/oadp"
mkdir -p ${SCRATCH}
echo "Cluster ID: ${ROSA_CLUSTER_ID}, Region: ${REGION}, OIDC Endpoint: ${OIDC_ENDPOINT}, AWS Account ID: ${AWS_ACCOUNT_ID}"
POLICY_ARN=$(aws iam list-policies --query "Policies[?PolicyName=='RosaOadp'].{ARN:Arn}" --output text)
if [[ -z "${POLICY_ARN}" ]]; then
cat << EOF > ${SCRATCH}/policy.json
{
"Version": "2012-10-17",
"Statement": [
{
"Effect": "Allow",
"Action": [
"s3:CreateBucket",
"s3:DeleteBucket",
"s3:PutBucketTagging",
"s3:GetBucketTagging",
"s3:PutEncryptionConfiguration",
"s3:GetEncryptionConfiguration",
"s3:PutLifecycleConfiguration",
"s3:GetLifecycleConfiguration",
"s3:GetBucketLocation",
"s3:ListBucket",
"s3:GetObject",
"s3:PutObject",
"s3:DeleteObject",
"s3:ListBucketMultipartUploads",
"s3:AbortMultipartUpload",
"s3:ListMultipartUploadParts",
"ec2:DescribeSnapshots",
"ec2:CreateTags",
"ec2:CreateVolume",
"ec2:CreateSnapshot",
"ec2:DeleteSnapshot"
],
"Resource": "*"
}
]}
EOF
POLICY_ARN=$(aws iam create-policy --policy-name "RosaOadp" \
--policy-document file:///${SCRATCH}/policy.json --query Policy.Arn \
--tags Key=rosa_openshift_version,Value=4.12 Key=rosa_role_prefix,Value=ManagedOpenShift Key=operator_namespace,Value=openshift-oadp Key=operator_name,Value=openshift-oadp \
--output text)
fi
echo ${POLICY_ARN}
oc get storageclass
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
gp2 kubernetes.io/aws-ebs Delete WaitForFirstConsumer true 93m
gp2-csi (default) ebs.csi.aws.com Delete WaitForFirstConsumer true 89m
gp3 ebs.csi.aws.com Delete WaitForFirstConsumer true 93m
gp3-csi ebs.csi.aws.com Delete WaitForFirstConsumer true 89m
oc get volumesnapshotclass csi-aws-vsc -o yaml
apiVersion: snapshot.storage.k8s.io/v1
deletionPolicy: Delete
driver: ebs.csi.aws.com
kind: VolumeSnapshotClass
metadata:
annotations:
snapshot.storage.kubernetes.io/is-default-class: "true"
creationTimestamp: "2023-07-06T02:02:42Z"
generation: 1
labels:
velero.io/csi-volumesnapshot-class: "true"
name: csi-aws-vsc
resourceVersion: "77674"
uid: 43b16ade-0435-4431-bb01-003c4a566fad
cat << EOF | oc create -f -
apiVersion: operators.coreos.com/v1
kind: OperatorGroup
metadata:
generateName: openshift-adp-
namespace: openshift-adp
name: oadp
spec:
targetNamespaces:
- openshift-adp
---
apiVersion: operators.coreos.com/v1alpha1
kind: Subscription
metadata:
name: redhat-oadp-operator
namespace: openshift-adp
spec:
channel: stable-1.2
installPlanApproval: Automatic
name: redhat-oadp-operator
source: redhat-operators
sourceNamespace: openshift-marketplace
EOF
[whayutin@thinkdoe mysql-persistent]$ oc get dpa wdh07052023d-dpa -n openshift-adp -oyaml
apiVersion: oadp.openshift.io/v1alpha1
kind: DataProtectionApplication
metadata:
creationTimestamp: "2023-07-06T02:45:45Z"
generation: 1
name: wdh07052023d-dpa
namespace: openshift-adp
resourceVersion: "72888"
uid: 9cea0c77-7718-4c70-b1f7-7e4442a51d74
spec:
backupLocations:
- bucket:
cloudStorageRef:
name: wdh07052023d-oadp
credential:
key: credentials
name: cloud-credentials
default: true
configuration:
restic:
enable: false
velero:
defaultPlugins:
- openshift
- aws
status:
conditions:
- lastTransitionTime: "2023-07-06T02:45:46Z"
message: Reconcile complete
reason: Complete
status: "True"
type: Reconciled
[whayutin@thinkdoe mysql-persistent]$ oc get bsl -n openshift-adp -o yaml
apiVersion: v1
items:
- apiVersion: velero.io/v1
kind: BackupStorageLocation
metadata:
creationTimestamp: "2023-07-06T02:45:45Z"
generation: 18
name: wdh07052023d-dpa-1
namespace: openshift-adp
ownerReferences:
- apiVersion: oadp.openshift.io/v1alpha1
blockOwnerDeletion: true
controller: true
kind: DataProtectionApplication
name: wdh07052023d-dpa
uid: 9cea0c77-7718-4c70-b1f7-7e4442a51d74
resourceVersion: "80757"
uid: 078d25e2-b210-4dad-ae83-77c0742992a7
spec:
config:
enableSharedConfig: "true"
credential:
key: credentials
name: cloud-credentials
default: true
objectStorage:
bucket: wdh07052023d-oadp
provider: aws
status:
lastSyncedTime: "2023-07-06T02:55:26Z"
lastValidationTime: "2023-07-06T02:56:15Z"
phase: Available
kind: List
metadata:
resourceVersion: ""
[whayutin@thinkdoe mysql-persistent]$ cat mysql-backup.yaml
apiVersion: velero.io/v1
kind: Backup
metadata:
name: mysql-persistent-sts-1
namespace: openshift-adp
spec:
includedNamespaces:
- mysql-persistent
storageLocation: wdh07052023d-dpa-1
ttl: 720h0m0s
[whayutin@thinkdoe mysql-persistent]$ velero backup describe mysql-persistent-sts-1 --details
Name: mysql-persistent-sts-1
Namespace: openshift-adp
Labels: velero.io/storage-location=wdh07052023d-dpa-1
Annotations: velero.io/source-cluster-k8s-gitversion=v1.25.10+8c21020
velero.io/source-cluster-k8s-major-version=1
velero.io/source-cluster-k8s-minor-version=25
Phase: Completed
Namespaces:
Included: mysql-persistent
Excluded: <none>
Resources:
Included: *
Excluded: <none>
Cluster-scoped: auto
Label selector: <none>
Storage Location: wdh07052023d-dpa-1
Velero-Native Snapshot PVs: auto
TTL: 720h0m0s
CSISnapshotTimeout: 10m0s
ItemOperationTimeout: 1h0m0s
Hooks: <none>
Backup Format Version: 1.1.0
Started: 2023-07-06 03:00:52 +0000 UTC
Completed: 2023-07-06 03:01:00 +0000 UTC
Expiration: 2023-08-05 03:00:52 +0000 UTC
Resource List:
apiextensions.k8s.io/v1/CustomResourceDefinition:
- clusterserviceversions.operators.coreos.com
apps.openshift.io/v1/DeploymentConfig:
- mysql-persistent/todolist
apps/v1/Deployment:
- mysql-persistent/mysql
apps/v1/ReplicaSet:
- mysql-persistent/mysql-7bc95589b4
authorization.openshift.io/v1/RoleBinding:
- mysql-persistent/admin-dedicated-admins
- mysql-persistent/admin-system:serviceaccounts:dedicated-admin
- mysql-persistent/alert-routing-edit-dedicated-admins
- mysql-persistent/dedicated-admins-project-dedicated-admins
- mysql-persistent/dedicated-admins-project-system:serviceaccounts:dedicated-admin
- mysql-persistent/system:deployers
- mysql-persistent/system:image-builders
- mysql-persistent/system:image-pullers
discovery.k8s.io/v1/EndpointSlice:
- mysql-persistent/mysql-zct5q
- mysql-persistent/todolist-hs78d
operators.coreos.com/v1alpha1/ClusterServiceVersion:
- mysql-persistent/observability-operator.v0.0.22
- mysql-persistent/route-monitor-operator.v0.1.502-ae88886
rbac.authorization.k8s.io/v1/RoleBinding:
- mysql-persistent/admin-dedicated-admins
- mysql-persistent/admin-system:serviceaccounts:dedicated-admin
- mysql-persistent/alert-routing-edit-dedicated-admins
- mysql-persistent/dedicated-admins-project-dedicated-admins
- mysql-persistent/dedicated-admins-project-system:serviceaccounts:dedicated-admin
- mysql-persistent/system:deployers
- mysql-persistent/system:image-builders
- mysql-persistent/system:image-pullers
route.openshift.io/v1/Route:
- mysql-persistent/todolist-route
security.openshift.io/v1/SecurityContextConstraints:
- mysql-persistent-scc
v1/ConfigMap:
- mysql-persistent/kube-root-ca.crt
- mysql-persistent/openshift-service-ca.crt
v1/Endpoints:
- mysql-persistent/mysql
- mysql-persistent/todolist
v1/Event:
- mysql-persistent/applog.176f27a452f9dd21
- mysql-persistent/applog.176f27a51986fab8
- mysql-persistent/applog.176f27a5198b2b09
- mysql-persistent/applog.176f27a5dbf6585f
- mysql-persistent/mysql-7bc95589b4-29rwg.176f27a446427a5b
- mysql-persistent/mysql-7bc95589b4-29rwg.176f27a57e4c8bef
- mysql-persistent/mysql-7bc95589b4-29rwg.176f27a607cca262
- mysql-persistent/mysql-7bc95589b4-29rwg.176f27a7ed647dad
- mysql-persistent/mysql-7bc95589b4-29rwg.176f27a7eebdde98
- mysql-persistent/mysql-7bc95589b4-29rwg.176f27aab8b34063
- mysql-persistent/mysql-7bc95589b4-29rwg.176f27aac37bd8d0
- mysql-persistent/mysql-7bc95589b4-29rwg.176f27aac6835459
- mysql-persistent/mysql-7bc95589b4.176f27a4461b5ef1
- mysql-persistent/mysql.176f27a442d56937
- mysql-persistent/mysql.176f27a4509a098f
- mysql-persistent/mysql.176f27a48f7ace32
- mysql-persistent/mysql.176f27a48f7cc03e
- mysql-persistent/mysql.176f27a558784d50
- mysql-persistent/todolist-1-deploy.176f27a44f207eef
- mysql-persistent/todolist-1-deploy.176f27a46fe6ff85
- mysql-persistent/todolist-1-deploy.176f27a4711a2970
- mysql-persistent/todolist-1-deploy.176f27a503cc8264
- mysql-persistent/todolist-1-deploy.176f27a50d61d2ac
- mysql-persistent/todolist-1-deploy.176f27a50ee7ad24
- mysql-persistent/todolist-1-nwlp8.176f27a6082149d5
- mysql-persistent/todolist-1-nwlp8.176f27a68fbf8c02
- mysql-persistent/todolist-1-nwlp8.176f27a7fa5d7de8
- mysql-persistent/todolist-1-nwlp8.176f27a7fbb7c804
- mysql-persistent/todolist-1-nwlp8.176f27a97ad5ca1e
- mysql-persistent/todolist-1-nwlp8.176f27a983b71650
- mysql-persistent/todolist-1-nwlp8.176f27a984e55196
- mysql-persistent/todolist-1-nwlp8.176f27abe8e942ab
- mysql-persistent/todolist-1-nwlp8.176f27accd7003b3
- mysql-persistent/todolist-1-nwlp8.176f27acd86a56f3
- mysql-persistent/todolist-1-nwlp8.176f27acdb1ca62b
- mysql-persistent/todolist-1.176f27a518e13a5a
- mysql-persistent/todolist.176f27a44c379959
v1/Namespace:
- mysql-persistent
v1/PersistentVolume:
- pvc-1e516450-296d-434f-887f-019c15980b98
- pvc-bf8f4285-534a-4270-816e-43002d70bbb4
v1/PersistentVolumeClaim:
- mysql-persistent/applog
- mysql-persistent/mysql
v1/Pod:
- mysql-persistent/mysql-7bc95589b4-29rwg
- mysql-persistent/todolist-1-deploy
- mysql-persistent/todolist-1-nwlp8
v1/ReplicationController:
- mysql-persistent/todolist-1
v1/Secret:
- mysql-persistent/builder-dockercfg-c98xh
- mysql-persistent/builder-token-sb2vw
- mysql-persistent/default-dockercfg-c7tdb
- mysql-persistent/default-token-4g2b9
- mysql-persistent/deployer-dockercfg-ggqbp
- mysql-persistent/deployer-token-8nmgd
- mysql-persistent/mysql-persistent-sa-dockercfg-9mhrw
- mysql-persistent/mysql-persistent-sa-token-djsvc
v1/Service:
- mysql-persistent/mysql
- mysql-persistent/todolist
v1/ServiceAccount:
- mysql-persistent/builder
- mysql-persistent/default
- mysql-persistent/deployer
- mysql-persistent/mysql-persistent-sa
Velero-Native Snapshots: <none included>
[whayutin@thinkdoe mysql-persistent]$ oc get backup mysql-persistent-sts-1 -n openshift-adp -o yaml
apiVersion: velero.io/v1
kind: Backup
metadata:
annotations:
velero.io/source-cluster-k8s-gitversion: v1.25.10+8c21020
velero.io/source-cluster-k8s-major-version: "1"
velero.io/source-cluster-k8s-minor-version: "25"
creationTimestamp: "2023-07-06T03:00:52Z"
generation: 4
labels:
velero.io/storage-location: wdh07052023d-dpa-1
name: mysql-persistent-sts-1
namespace: openshift-adp
resourceVersion: "84612"
uid: b0dca6a5-9b0f-4b2b-98bf-ec35324ad6fa
spec:
csiSnapshotTimeout: 10m0s
defaultVolumesToFsBackup: false
includedNamespaces:
- mysql-persistent
itemOperationTimeout: 1h0m0s
storageLocation: wdh07052023d-dpa-1
ttl: 720h0m0s
status:
completionTimestamp: "2023-07-06T03:01:00Z"
expiration: "2023-08-05T03:00:52Z"
formatVersion: 1.1.0
phase: Completed
startTimestamp: "2023-07-06T03:00:52Z"
version: 1
[whayutin@thinkdoe mysql-persistent]$ s3cmd ls s3://wdh07052023d-oadp/backups/
DIR s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/
[whayutin@thinkdoe mysql-persistent]$ s3cmd ls s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/
2023-07-06 03:01 29 s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/mysql-persistent-sts-1-csi-volumesnapshotclasses.json.gz
2023-07-06 03:01 29 s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/mysql-persistent-sts-1-csi-volumesnapshotcontents.json.gz
2023-07-06 03:01 29 s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/mysql-persistent-sts-1-csi-volumesnapshots.json.gz
2023-07-06 03:01 27 s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/mysql-persistent-sts-1-itemoperations.json.gz
2023-07-06 03:01 12181 s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/mysql-persistent-sts-1-logs.gz
2023-07-06 03:01 29 s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/mysql-persistent-sts-1-podvolumebackups.json.gz
2023-07-06 03:01 1088 s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/mysql-persistent-sts-1-resource-list.json.gz
2023-07-06 03:01 49 s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/mysql-persistent-sts-1-results.gz
2023-07-06 03:01 29 s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/mysql-persistent-sts-1-volumesnapshots.json.gz
2023-07-06 03:01 216382 s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/mysql-persistent-sts-1.tar.gz
2023-07-06 03:01 2547 s3://wdh07052023d-oadp/backups/mysql-persistent-sts-1/velero-backup.json
[whayutin@thinkdoe mysql-persistent]$
[whayutin@thinkdoe mysql-persistent]$ oc get all -n mysql-persistent
NAME READY STATUS RESTARTS AGE
pod/mysql-7bc95589b4-29rwg 1/1 Running 0 19m
pod/todolist-1-deploy 0/1 Completed 0 19m
pod/todolist-1-nwlp8 1/1 Running 0 19m
NAME DESIRED CURRENT READY AGE
replicationcontroller/todolist-1 1 1 1 19m
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/mysql ClusterIP 172.30.231.7 <none> 3306/TCP 19m
service/todolist ClusterIP 172.30.236.103 <none> 8000/TCP 19m
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/mysql 1/1 1 1 19m
NAME DESIRED CURRENT READY AGE
replicaset.apps/mysql-7bc95589b4 1 1 1 19m
NAME REVISION DESIRED CURRENT TRIGGERED BY
deploymentconfig.apps.openshift.io/todolist 1 1 1 config
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
route.route.openshift.io/todolist-route todolist-route-mysql-persistent.apps.wdh07052023d.zjej.p1.openshiftapps.com / todolist <all> None
[whayutin@thinkdoe mysql-persistent]$ oc delete namespace mysql-persistent
namespace "mysql-persistent" deleted
[whayutin@thinkdoe mysql-persistent]$
[whayutin@thinkdoe mysql-persistent]$ oc get all -n mysql-persistent
No resources found in mysql-persistent namespace.
[whayutin@thinkdoe mysql-persistent]$
apiVersion: velero.io/v1
kind: Restore
metadata:
name: mysql-persistent
namespace: openshift-adp
spec:
backupName: mysql-persistent-sts-1
restorePVs: true
[whayutin@thinkdoe mysql-persistent]$ velero restore get
NAME BACKUP STATUS STARTED COMPLETED ERRORS WARNINGS CREATED SELECTOR
mysql-persistent mysql-persistent-sts-1 Completed 2023-07-06 03:15:06 +0000 UTC 2023-07-06 03:15:31 +0000 UTC 0 24 2023-07-06 03:15:06 +0000 UTC <none>
[whayutin@thinkdoe mysql-persistent]$ velero restore describe mysql-persistent --details
Name: mysql-persistent
Namespace: openshift-adp
Labels: <none>
Annotations: <none>
Phase: Completed
Total items to be restored: 52
Items restored: 52
Started: 2023-07-06 03:15:06 +0000 UTC
Completed: 2023-07-06 03:15:31 +0000 UTC
Warnings:
Velero: <none>
Cluster: could not restore, CustomResourceDefinition "clusterserviceversions.operators.coreos.com" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, SecurityContextConstraints "mysql-persistent-scc" already exists. Warning: the in-cluster version is different than the backed-up version.
Namespaces:
mysql-persistent: could not restore, ConfigMap "kube-root-ca.crt" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, ConfigMap "openshift-service-ca.crt" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, ClusterServiceVersion "observability-operator.v0.0.22" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, ClusterServiceVersion "route-monitor-operator.v0.1.502-ae88886" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, Endpoints "mysql" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, Endpoints "todolist" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "admin-dedicated-admins" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "admin-system:serviceaccounts:dedicated-admin" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "alert-routing-edit-dedicated-admins" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "dedicated-admins-project-dedicated-admins" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "dedicated-admins-project-system:serviceaccounts:dedicated-admin" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "system:deployers" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "system:image-builders" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "system:image-pullers" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "admin-dedicated-admins" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "admin-system:serviceaccounts:dedicated-admin" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "alert-routing-edit-dedicated-admins" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "dedicated-admins-project-dedicated-admins" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "dedicated-admins-project-system:serviceaccounts:dedicated-admin" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "system:deployers" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "system:image-builders" already exists. Warning: the in-cluster version is different than the backed-up version.
could not restore, RoleBinding "system:image-pullers" already exists. Warning: the in-cluster version is different than the backed-up version.
Backup: mysql-persistent-sts-1
Namespaces:
Included: all namespaces found in the backup
Excluded: <none>
Resources:
Included: *
Excluded: nodes, events, events.events.k8s.io, backups.velero.io, restores.velero.io, resticrepositories.velero.io, csinodes.storage.k8s.io, volumeattachments.storage.k8s.io, backuprepositories.velero.io
Cluster-scoped: auto
Namespace mappings: <none>
Label selector: <none>
Restore PVs: true
Existing Resource Policy: <none>
ItemOperationTimeout: 1h0m0s
Preserve Service NodePorts: auto
Resource List:
apiextensions.k8s.io/v1/CustomResourceDefinition:
- clusterserviceversions.operators.coreos.com(failed)
apps.openshift.io/v1/DeploymentConfig:
- mysql-persistent/todolist(created)
apps/v1/Deployment:
- mysql-persistent/mysql(created)
apps/v1/ReplicaSet:
- mysql-persistent/mysql-7bc95589b4(skipped)
authorization.openshift.io/v1/RoleBinding:
- mysql-persistent/admin-dedicated-admins(failed)
- mysql-persistent/admin-system:serviceaccounts:dedicated-admin(failed)
- mysql-persistent/alert-routing-edit-dedicated-admins(failed)
- mysql-persistent/dedicated-admins-project-dedicated-admins(failed)
- mysql-persistent/dedicated-admins-project-system:serviceaccounts:dedicated-admin(failed)
- mysql-persistent/system:deployers(failed)
- mysql-persistent/system:image-builders(failed)
- mysql-persistent/system:image-pullers(failed)
discovery.k8s.io/v1/EndpointSlice:
- mysql-persistent/mysql-zct5q(created)
- mysql-persistent/todolist-hs78d(created)
operators.coreos.com/v1alpha1/ClusterServiceVersion:
- mysql-persistent/observability-operator.v0.0.22(failed)
- mysql-persistent/route-monitor-operator.v0.1.502-ae88886(failed)
rbac.authorization.k8s.io/v1/RoleBinding:
- mysql-persistent/admin-dedicated-admins(failed)
- mysql-persistent/admin-system:serviceaccounts:dedicated-admin(failed)
- mysql-persistent/alert-routing-edit-dedicated-admins(failed)
- mysql-persistent/dedicated-admins-project-dedicated-admins(failed)
- mysql-persistent/dedicated-admins-project-system:serviceaccounts:dedicated-admin(failed)
- mysql-persistent/system:deployers(failed)
- mysql-persistent/system:image-builders(failed)
- mysql-persistent/system:image-pullers(failed)
route.openshift.io/v1/Route:
- mysql-persistent/todolist-route(created)
security.openshift.io/v1/SecurityContextConstraints:
- mysql-persistent-scc(failed)
v1/ConfigMap:
- mysql-persistent/kube-root-ca.crt(failed)
- mysql-persistent/openshift-service-ca.crt(failed)
v1/Endpoints:
- mysql-persistent/mysql(failed)
- mysql-persistent/todolist(failed)
v1/Namespace:
- mysql-persistent(created)
v1/PersistentVolume:
- pvc-1e516450-296d-434f-887f-019c15980b98(skipped)
- pvc-bf8f4285-534a-4270-816e-43002d70bbb4(skipped)
v1/PersistentVolumeClaim:
- mysql-persistent/applog(created)
- mysql-persistent/mysql(created)
v1/Pod:
- mysql-persistent/mysql-7bc95589b4-29rwg(skipped)
- mysql-persistent/todolist-1-nwlp8(skipped)
v1/ReplicationController:
- mysql-persistent/todolist-1(skipped)
v1/Secret:
- mysql-persistent/builder-dockercfg-c98xh(created)
- mysql-persistent/builder-token-sb2vw(skipped)
- mysql-persistent/default-dockercfg-c7tdb(created)
- mysql-persistent/default-token-4g2b9(skipped)
- mysql-persistent/deployer-dockercfg-ggqbp(created)
- mysql-persistent/deployer-token-8nmgd(skipped)
- mysql-persistent/mysql-persistent-sa-dockercfg-9mhrw(created)
- mysql-persistent/mysql-persistent-sa-token-djsvc(skipped)
v1/Service:
- mysql-persistent/mysql(created)
- mysql-persistent/todolist(created)
v1/ServiceAccount:
- mysql-persistent/builder(skipped)
- mysql-persistent/default(skipped)
- mysql-persistent/deployer(skipped)
- mysql-persistent/mysql-persistent-sa(created)
[whayutin@thinkdoe mysql-persistent]$ oc get all -n mysql-persistent
NAME READY STATUS RESTARTS AGE
pod/mysql-7bc95589b4-cf2jw 1/1 Running 0 2m53s
pod/todolist-1-deploy 0/1 Completed 0 2m53s
pod/todolist-1-svq6d 1/1 Running 0 2m52s
NAME DESIRED CURRENT READY AGE
replicationcontroller/todolist-1 1 1 1 2m54s
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
service/mysql ClusterIP 172.30.24.187 <none> 3306/TCP 2m54s
service/todolist ClusterIP 172.30.156.86 <none> 8000/TCP 2m54s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/mysql 1/1 1 1 2m54s
NAME DESIRED CURRENT READY AGE
replicaset.apps/mysql-7bc95589b4 1 1 1 2m54s
NAME REVISION DESIRED CURRENT TRIGGERED BY
deploymentconfig.apps.openshift.io/todolist 1 1 1 config
NAME HOST/PORT PATH SERVICES PORT TERMINATION WILDCARD
route.route.openshift.io/todolist-route todolist-route-mysql-persistent.apps.wdh07052023d.zjej.p1.openshiftapps.com / todolist <all> None
[whayutin@thinkdoe mysql-persistent]$
vsl
oc get vsl wdh07052023d-dpa-1 -n openshift-adp -o yaml
apiVersion: velero.io/v1
kind: VolumeSnapshotLocation
metadata:
creationTimestamp: "2023-07-06T17:58:46Z"
generation: 1
name: wdh07052023d-dpa-1
namespace: openshift-adp
ownerReferences:
- apiVersion: oadp.openshift.io/v1alpha1
blockOwnerDeletion: true
controller: true
kind: DataProtectionApplication
name: wdh07052023d-dpa
uid: 9cea0c77-7718-4c70-b1f7-7e4442a51d74
resourceVersion: "738007"
uid: 211fc05d-ccd7-4277-9f3b-fd04485b2207
spec:
config:
profile: default
region: us-west-2
provider: aws
status: {}
oc create -f minimal-3csivol.yaml
namespace/minimal-3csivol created
deployment.apps/minimal-3csivol created
persistentvolumeclaim/volume1 created
persistentvolumeclaim/volume2 created
persistentvolumeclaim/volume3 created
[whayutin@thinkdoe minimal-8csivol]$ oc get all -n minimal-3csivol
NAME READY STATUS RESTARTS AGE
pod/minimal-3csivol-565559fbcd-dhmrh 1/1 Running 0 14s
NAME READY UP-TO-DATE AVAILABLE AGE
deployment.apps/minimal-3csivol 1/1 1 1 15s
NAME DESIRED CURRENT READY AGE
replicaset.apps/minimal-3csivol-565559fbcd 1 1 1 16s
[whayutin@thinkdoe minimal-8csivol]$ oc get pvc -n minimal-3csivol
NAME STATUS VOLUME CAPACITY ACCESS MODES STORAGECLASS AGE
volume1 Bound pvc-871dd219-c75b-43f1-b969-cfeea0421e5d 1Gi RWO gp2 22s
volume2 Bound pvc-c072e2dc-d096-4ce9-ba94-158589596bea 1Gi RWO gp2 21s
volume3 Bound pvc-936a5b1e-1976-432f-85e5-d2ebc3cd4b11 1Gi RWO gp2 21s
[whayutin@thinkdoe minimal-8csivol]$ oc get storageclass
NAME PROVISIONER RECLAIMPOLICY VOLUMEBINDINGMODE ALLOWVOLUMEEXPANSION AGE
gp2 (default) kubernetes.io/aws-ebs Delete WaitForFirstConsumer true 16h
gp2-csi ebs.csi.aws.com Delete WaitForFirstConsumer true 16h
gp3 ebs.csi.aws.com Delete WaitForFirstConsumer true 16h
gp3-csi ebs.csi.aws.com Delete WaitForFirstConsumer true 16h
cat minimal-3csivol-backup.yaml
apiVersion: velero.io/v1
kind: Backup
metadata:
name: minimal-3csivol-vsl-1
namespace: openshift-adp
spec:
includedNamespaces:
- minimal-3csivol
storageLocation: wdh07052023d-dpa-1
ttl: 720h0m0s
or
By clicking below, you agree to our terms of service.
New to HackMD? Sign up