CloudNativePGの1.22.2がリリースされたようなのでアップグレード。
主な変更点はこちらの記事を参照。
Upgrading Operator
kubectl apply -f https://raw.githubusercontent.com/cloudnative-pg/cloudnative-pg/release-1.22/releases/cnpg-1.22.2.yaml
Operatorがアップグレードされると、PostgreSQL Clusterも自動的に再起動される。
アップグレード完了後のステータス。
Upgrading CNPG Client module
curl -sSfL https://github.com/cloudnative-pg/cloudnative-pg/raw/main/hack/install-cnpg-plugin.sh | sudo sh -s -- -b /usr/local/bin
バージョン確認
kubectl-cnpg version
Build: {Version:1.22.2 Commit:bcdcd885 Date:2024-03-14}
kubectl-cnpg -n cnpg161 status cnpg161
Cluster Summary
Name: cnpg161
Namespace: cnpg161
System ID: 7303351267317084179
PostgreSQL Image: ghcr.io/cloudnative-pg/postgresql:16.2
Primary instance: cnpg161-4
Primary start time: 2024-03-16 01:51:02 +0000 UTC (uptime 11m56s)
Status: Cluster in healthy state
Instances: 2
Ready instances: 2
Current Write LSN: 7E/B70025C0 (Timeline: 11 - WAL File: 0000000B0000007E000000B7)
Certificates Status
Certificate Name Expiration Date Days Left Until Expiration
---------------- --------------- --------------------------
cnpg161-ca 2024-05-11 01:48:04 +0000 UTC 55.99
cnpg161-replication 2024-05-11 01:48:04 +0000 UTC 55.99
cnpg161-server 2024-05-11 01:48:04 +0000 UTC 55.99
Continuous Backup status
First Point of Recoverability: 2024-02-15T00:01:22Z
Working WAL archiving: OK
WALs waiting to be archived: 0
Last Archived WAL: 0000000B0000007E000000B6 @ 2024-03-16T02:01:04.160558Z
Last Failed WAL: 0000000B.history @ 2024-03-16T01:51:02.041141Z
Physical backups
No running physical backups found
Streaming Replication status
Replication Slots Enabled
Name Sent LSN Write LSN Flush LSN Replay LSN Write Lag Flush Lag Replay Lag State Sync State Sync Priority Replication Slot
---- -------- --------- --------- ---------- --------- --------- ---------- ----- ---------- ------------- ----------------
cnpg161-3 7E/B70025C0 7E/B70025C0 7E/B70025C0 7E/B70025C0 00:00:00 00:00:00 00:00:00 streaming quorum 1 active
Unmanaged Replication Slot Status
No unmanaged replication slots found
Managed roles status
No roles managed
Tablespaces status
No managed tablespaces
Instances status
Name Database Size Current LSN Replication role Status QoS Manager Version Node
---- ------------- ----------- ---------------- ------ --- --------------- ----
cnpg161-4 90 MB 7E/B70025C0 Primary OK BestEffort 1.22.2 dok8s-vke1-np2-bbb80e98df71
cnpg161-3 90 MB 7E/B70025C0 Standby (sync) OK BestEffort 1.22.2 dok8s-vke1-np2-3a299932e3e4