{"id":33547,"date":"2024-06-11T13:44:46","date_gmt":"2024-06-11T11:44:46","guid":{"rendered":"https:\/\/www.dbi-services.com\/blog\/?p=33547"},"modified":"2024-06-10T13:48:13","modified_gmt":"2024-06-10T11:48:13","slug":"cloudnativepg-the-kubectl-plugin","status":"publish","type":"post","link":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/","title":{"rendered":"CloudNativePG \u2013 The kubectl plugin"},"content":{"rendered":"\n<p>As we&#8217;re getting more and more familiar with CloudNativePG, now it&#8217;s time to get more information about our cluster, either for monitoring or troubleshooting purposes. Getting information about the general state of our cluster can be easily done by using kubectl.<\/p>\n\n\n\n<p>For listing the global state of our cluster, you can do:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nminicube@micro-minicube:~&gt; kubectl get cluster -A\nNAMESPACE   NAME            AGE   INSTANCES   READY   STATUS                     PRIMARY\ndefault     my-pg-cluster   41h   3           3       Cluster in healthy state   my-pg-cluster-1\n<\/pre><\/div>\n\n\n<p>As we&#8217;ve seen in the previous posts (<a href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-on-minicube-on-opensuse-leap-micro-6\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>, <a href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-bootstrapping-an-empty-cluster\/\">here<\/a>, <a href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-configuring-the-postgresql-instance\/\">here<\/a> and <a href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-postgresql-extensions\/\" target=\"_blank\" rel=\"noreferrer noopener\">here<\/a>) kubectl can also be used to get information about the pods and services of the deployment:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,6]; title: ; notranslate\" title=\"\">\nminicube@micro-minicube:~&gt; kubectl get pods\nNAME              READY   STATUS    RESTARTS   AGE\nmy-pg-cluster-1   1\/1     Running   0          108m\nmy-pg-cluster-2   1\/1     Running   0          103m\nmy-pg-cluster-3   1\/1     Running   0          103m\nminicube@micro-minicube:~&gt; kubectl get services\nNAME               TYPE        CLUSTER-IP       EXTERNAL-IP   PORT(S)    AGE\nkubernetes         ClusterIP   10.96.0.1        &lt;none&gt;        443\/TCP    4d\nmy-pg-cluster-r    ClusterIP   10.111.113.4     &lt;none&gt;        5432\/TCP   41h\nmy-pg-cluster-ro   ClusterIP   10.110.137.246   &lt;none&gt;        5432\/TCP   41h\nmy-pg-cluster-rw   ClusterIP   10.100.77.15     &lt;none&gt;        5432\/TCP   41h\n<\/pre><\/div>\n\n\n<p>What we cannot see easily with kubectl is information related to PostgreSQL itself. But as kubectl can be extended with <a href=\"https:\/\/kubernetes.io\/docs\/tasks\/extend-kubectl\/kubectl-plugins\/\">plugins<\/a>, CloudNativePG comes with a plugin for kubectl which is called &#8220;<a href=\"https:\/\/cloudnative-pg.io\/documentation\/1.23\/kubectl-plugin\/\" target=\"_blank\" rel=\"noreferrer noopener\">cnpg<\/a>&#8220;. There are several installation methods available, we&#8217;ll go for the scripted version:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nminicube@micro-minicube:~&gt; curl -sSfL https:\/\/github.com\/cloudnative-pg\/cloudnative-pg\/raw\/main\/hack\/install-cnpg-plugin.sh | sudo sh -s -- -b \/usr\/local\/bin\ncloudnative-pg\/cloudnative-pg info checking GitHub for latest tag\ncloudnative-pg\/cloudnative-pg info found version: 1.23.1 for v1.23.1\/linux\/x86_64\ncloudnative-pg\/cloudnative-pg info installed \/usr\/local\/bin\/kubectl-cnpg\n<\/pre><\/div>\n\n\n<p>A very nice feature of this plugin is, that it comes with support for auto completion of the available commands, but this needs to be configured before you can use it. You can use the plugin itself to generate the completion script for one of the supported shells (bash in my case):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1,9,10,11,12,15,16,17]; title: ; notranslate\" title=\"\">\nminicube@micro-minicube:~&gt; kubectl cnpg completion\nGenerate the autocompletion script for kubectl-cnpg for the specified shell.\nSee each sub-command&#039;s help for details on how to use the generated script.\n\nUsage:\n  kubectl cnpg completion &#x5B;command]\n\nAvailable Commands:\n  bash        Generate the autocompletion script for bash\n  fish        Generate the autocompletion script for fish\n  powershell  Generate the autocompletion script for powershell\n  zsh         Generate the autocompletion script for zsh\n\n...\nminicube@micro-minicube:~&gt; kubectl cnpg completion bash &gt; kubectl_complete-cnpg\nminicube@micro-minicube:~&gt; chmod +x kubectl_complete-cnpg\nminicube@micro-minicube:~&gt; sudo mv kubectl_complete-cnpg \/usr\/local\/bin\/\n<\/pre><\/div>\n\n\n<p>From now, tab completion is working:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nminicube@micro-minicube:~&gt; kubectl-cnpg &#x5B;TAB]&#x5B;TAB]\nbackup        (Request an on-demand backup for a PostgreSQL Cluster)\ncertificate   (Create a client certificate to connect to PostgreSQL using TLS and Certificate authentication)\ncompletion    (Generate the autocompletion script for the specified shell)\ndestroy       (Destroy the instance named &#x5B;cluster]-&#x5B;node] or &#x5B;node] with the associated PVC)\nfencing       (Fencing related commands)\nfio           (Creates a fio deployment, pvc and configmap)\nhelp          (Help about any command)\nhibernate     (Hibernation related commands)\ninstall       (CNPG installation commands)\nlogs          (Collect cluster logs)\nmaintenance   (Sets or removes maintenance mode from clusters)\npgadmin4      (Creates a pgadmin deployment)\npgbench       (Creates a pgbench job)\npromote       (Promote the pod named &#x5B;cluster]-&#x5B;node] or &#x5B;node] to primary)\npsql          (Start a psql session targeting a CloudNativePG cluster)\npublication   (Logical publication management commands)\nreload        (Reload the cluster)\nreport        (Report on the operator)\nrestart       (Restart a cluster or a single instance in a cluster)\nsnapshot      (command removed)\nstatus        (Get the status of a PostgreSQL cluster)\nsubscription  (Logical subscription management commands)\nversion       (Prints version, commit sha and date of the build)\n<\/pre><\/div>\n\n\n<p>As you can see, quite a few commands are available, but for the scope of this post, we&#8217;ll only use the commands for getting logs and detailed information about our cluster. Obviously the &#8220;status&#8221; command should give us some global information about the cluster, and actually it will give us much more:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nminicube@micro-minicube:~&gt; kubectl-cnpg status my-pg-cluster\nCluster Summary\nName:                my-pg-cluster\nNamespace:           default\nSystem ID:           7378131726640287762\nPostgreSQL Image:    ghcr.io\/cloudnative-pg\/postgresql:16.2\nPrimary instance:    my-pg-cluster-1\nPrimary start time:  2024-06-08 13:59:26 +0000 UTC (uptime 42h49m23s)\nStatus:              Cluster in healthy state \nInstances:           3\nReady instances:     3\nCurrent Write LSN:   0\/1E000000 (Timeline: 1 - WAL File: 00000001000000000000000E)\n\nCertificates Status\nCertificate Name           Expiration Date                Days Left Until Expiration\n----------------           ---------------                --------------------------\nmy-pg-cluster-ca           2024-09-06 13:54:17 +0000 UTC  88.21\nmy-pg-cluster-replication  2024-09-06 13:54:17 +0000 UTC  88.21\nmy-pg-cluster-server       2024-09-06 13:54:17 +0000 UTC  88.21\n\nContinuous Backup status\nNot configured\n\nPhysical backups\nNo running physical backups found\n\nStreaming Replication status\nReplication Slots Enabled\nName             Sent LSN    Write LSN   Flush LSN   Replay LSN  Write Lag  Flush Lag  Replay Lag  State      Sync State  Sync Priority  Replication Slot\n----             --------    ---------   ---------   ----------  ---------  ---------  ----------  -----      ----------  -------------  ----------------\nmy-pg-cluster-2  0\/1E000000  0\/1E000000  0\/1E000000  0\/1E000000  00:00:00   00:00:00   00:00:00    streaming  async       0              active\nmy-pg-cluster-3  0\/1E000000  0\/1E000000  0\/1E000000  0\/1E000000  00:00:00   00:00:00   00:00:00    streaming  async       0              active\n\nUnmanaged Replication Slot Status\nNo unmanaged replication slots found\n\nManaged roles status\nNo roles managed\n\nTablespaces status\nNo managed tablespaces\n\nPod Disruption Budgets status\nName                   Role     Expected Pods  Current Healthy  Minimum Desired Healthy  Disruptions Allowed\n----                   ----     -------------  ---------------  -----------------------  -------------------\nmy-pg-cluster          replica  2              2                1                        1\nmy-pg-cluster-primary  primary  1              1                1                        0\n\nInstances status\nName             Database Size  Current LSN  Replication role  Status  QoS         Manager Version  Node\n----             -------------  -----------  ----------------  ------  ---         ---------------  ----\nmy-pg-cluster-1  37 MB          0\/1E000000   Primary           OK      BestEffort  1.23.1           minikube\nmy-pg-cluster-2  37 MB          0\/1E000000   Standby (async)   OK      BestEffort  1.23.1           minikube\nmy-pg-cluster-3  37 MB          0\/1E000000   Standby (async)   OK      BestEffort  1.23.1           minikube\n\n<\/pre><\/div>\n\n\n<p>This is quite some amount of information and tells us a lot about our cluster, including:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>We have one primary node and two replicas in asynchronous replication (this comes from the three instances we specified in the cluster configuration)<\/li>\n\n\n\n<li>All instances are healthy and there is no replication lag<\/li>\n\n\n\n<li>The version of PostgreSQL is 16.2<\/li>\n\n\n\n<li>The configuration is using replication slots<\/li>\n\n\n\n<li>Information about the certificates used for encrypted traffic<\/li>\n\n\n\n<li>We do not have configured any backups (this will be the topic of one of the next posts)<\/li>\n<\/ul>\n\n\n\n<p>If you want too see even more information, including e.g. the configuration of PostgreSQL, pass the &#8220;&#8211;verbose&#8221; flag to the status command:<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nminicube@micro-minicube:~&gt; kubectl-cnpg status my-pg-cluster --verbose\nCluster Summary\nName:                my-pg-cluster\nNamespace:           default\nSystem ID:           7378131726640287762\nPostgreSQL Image:    ghcr.io\/cloudnative-pg\/postgresql:16.2\nPrimary instance:    my-pg-cluster-1\nPrimary start time:  2024-06-08 13:59:26 +0000 UTC (uptime 42h57m30s)\nStatus:              Cluster in healthy state \nInstances:           3\nReady instances:     3\nCurrent Write LSN:   0\/20000110 (Timeline: 1 - WAL File: 000000010000000000000010)\n\nPostgreSQL Configuration\narchive_command = &#039;\/controller\/manager wal-archive --log-destination \/controller\/log\/postgres.json %p&#039;\narchive_mode = &#039;on&#039;\narchive_timeout = &#039;5min&#039;\ncluster_name = &#039;my-pg-cluster&#039;\ndynamic_shared_memory_type = &#039;posix&#039;\nfull_page_writes = &#039;on&#039;\nhot_standby = &#039;true&#039;\nlisten_addresses = &#039;*&#039;\nlog_destination = &#039;csvlog&#039;\nlog_directory = &#039;\/controller\/log&#039;\nlog_filename = &#039;postgres&#039;\nlog_rotation_age = &#039;0&#039;\nlog_rotation_size = &#039;0&#039;\nlog_truncate_on_rotation = &#039;false&#039;\nlogging_collector = &#039;on&#039;\nmax_parallel_workers = &#039;32&#039;\nmax_replication_slots = &#039;32&#039;\nmax_worker_processes = &#039;32&#039;\npg_stat_statements.max = &#039;2500&#039;\nport = &#039;5432&#039;\nrestart_after_crash = &#039;false&#039;\nshared_memory_type = &#039;mmap&#039;\nshared_preload_libraries = &#039;pg_stat_statements&#039;\nssl = &#039;on&#039;\nssl_ca_file = &#039;\/controller\/certificates\/client-ca.crt&#039;\nssl_cert_file = &#039;\/controller\/certificates\/server.crt&#039;\nssl_key_file = &#039;\/controller\/certificates\/server.key&#039;\nssl_max_protocol_version = &#039;TLSv1.3&#039;\nssl_min_protocol_version = &#039;TLSv1.3&#039;\nunix_socket_directories = &#039;\/controller\/run&#039;\nwal_keep_size = &#039;512MB&#039;\nwal_level = &#039;logical&#039;\nwal_log_hints = &#039;on&#039;\nwal_receiver_timeout = &#039;5s&#039;\nwal_sender_timeout = &#039;5s&#039;\nwork_mem = &#039;12MB&#039;\ncnpg.config_sha256 = &#039;db8a255b574978eb43a479ec688a1e8e72281ec3fa03b59bcb3cf3bf9b997e67&#039;\n\nPostgreSQL HBA Rules\n\n#\n# FIXED RULES\n#\n\n# Grant local access (&#039;local&#039; user map)\nlocal all all peer map=local\n\n# Require client certificate authentication for the streaming_replica user\nhostssl postgres streaming_replica all cert\nhostssl replication streaming_replica all cert\nhostssl all cnpg_pooler_pgbouncer all cert\n\n#\n# USER-DEFINED RULES\n#\n\n\nhost all all 192.168.122.0\/24 scram-sha-256\n\n\n\n#\n# DEFAULT RULES\n#\nhost all all all scram-sha-256\n\n\nCertificates Status\nCertificate Name           Expiration Date                Days Left Until Expiration\n----------------           ---------------                --------------------------\nmy-pg-cluster-ca           2024-09-06 13:54:17 +0000 UTC  88.21\nmy-pg-cluster-replication  2024-09-06 13:54:17 +0000 UTC  88.21\nmy-pg-cluster-server       2024-09-06 13:54:17 +0000 UTC  88.21\n\nContinuous Backup status\nNot configured\n\nPhysical backups\nNo running physical backups found\n\nStreaming Replication status\nReplication Slots Enabled\nName             Sent LSN    Write LSN   Flush LSN   Replay LSN  Write Lag  Flush Lag  Replay Lag  State      Sync State  Sync Priority  Replication Slot  Slot Restart LSN  Slot WAL Status  Slot Safe WAL Size\n----             --------    ---------   ---------   ----------  ---------  ---------  ----------  -----      ----------  -------------  ----------------  ----------------  ---------------  ------------------\nmy-pg-cluster-2  0\/20000110  0\/20000110  0\/20000110  0\/20000110  00:00:00   00:00:00   00:00:00    streaming  async       0              active            0\/20000110        reserved         NULL\nmy-pg-cluster-3  0\/20000110  0\/20000110  0\/20000110  0\/20000110  00:00:00   00:00:00   00:00:00    streaming  async       0              active            0\/20000110        reserved         NULL\n\nUnmanaged Replication Slot Status\nNo unmanaged replication slots found\n\nManaged roles status\nNo roles managed\n\nTablespaces status\nNo managed tablespaces\n\nPod Disruption Budgets status\nName                   Role     Expected Pods  Current Healthy  Minimum Desired Healthy  Disruptions Allowed\n----                   ----     -------------  ---------------  -----------------------  -------------------\nmy-pg-cluster          replica  2              2                1                        1\nmy-pg-cluster-primary  primary  1              1                1                        0\n\nInstances status\nName             Database Size  Current LSN  Replication role  Status  QoS         Manager Version  Node\n----             -------------  -----------  ----------------  ------  ---         ---------------  ----\nmy-pg-cluster-1  37 MB          0\/20000110   Primary           OK      BestEffort  1.23.1           minikube\nmy-pg-cluster-2  37 MB          0\/20000110   Standby (async)   OK      BestEffort  1.23.1           minikube\nmy-pg-cluster-3  37 MB          0\/20000110   Standby (async)   OK      BestEffort  1.23.1           minikube\n\n<\/pre><\/div>\n\n\n<p>The other important command when it comes to troubleshooting is the &#8220;logs&#8221; command (the &#8220;-f&#8221; is for tail):<\/p>\n\n\n<div class=\"wp-block-syntaxhighlighter-code \"><pre class=\"brush: bash; highlight: [1]; title: ; notranslate\" title=\"\">\nminicube@micro-minicube:~&gt; kubectl-cnpg logs cluster my-pg-cluster -f\n...\n{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2024-06-10T08:51:59Z&quot;,&quot;logger&quot;:&quot;wal-archive&quot;,&quot;msg&quot;:&quot;Backup not configured, skip WAL archiving via Barman Cloud&quot;,&quot;logging_pod&quot;:&quot;my-pg-cluster-1&quot;,&quot;walName&quot;:&quot;pg_wal\/00000001000000000000000F&quot;,&quot;currentPrimary&quot;:&quot;my-pg-cluster-1&quot;,&quot;targetPrimary&quot;:&quot;my-pg-cluster-1&quot;}\n{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2024-06-10T08:52:00Z&quot;,&quot;logger&quot;:&quot;postgres&quot;,&quot;msg&quot;:&quot;record&quot;,&quot;logging_pod&quot;:&quot;my-pg-cluster-1&quot;,&quot;record&quot;:{&quot;log_time&quot;:&quot;2024-06-10 08:52:00.121 UTC&quot;,&quot;process_id&quot;:&quot;1289&quot;,&quot;session_id&quot;:&quot;66669223.509&quot;,&quot;session_line_num&quot;:&quot;4&quot;,&quot;session_start_time&quot;:&quot;2024-06-10 05:41:55 UTC&quot;,&quot;transaction_id&quot;:&quot;0&quot;,&quot;error_severity&quot;:&quot;LOG&quot;,&quot;sql_state_code&quot;:&quot;00000&quot;,&quot;message&quot;:&quot;checkpoint complete: wrote 10 buffers (0.1%); 0 WAL file(s) added, 0 removed, 0 recycled; write=1.005 s, sync=0.006 s, total=1.111 s; sync files=5, longest=0.002 s, average=0.002 s; distance=64233 kB, estimate=64233 kB; lsn=0\/20000060, redo lsn=0\/1E006030&quot;,&quot;backend_type&quot;:&quot;checkpointer&quot;,&quot;query_id&quot;:&quot;0&quot;}}\n{&quot;level&quot;:&quot;info&quot;,&quot;ts&quot;:&quot;2024-06-10T08:56:59Z&quot;,&quot;logger&quot;:&quot;wal-archive&quot;,&quot;msg&quot;:&quot;Backup not configured, skip WAL archiving via Barman Cloud&quot;,&quot;logging_pod&quot;:&quot;my-pg-cluster-1&quot;,&quot;walName&quot;:&quot;pg_wal\/000000010000000000000010&quot;,&quot;currentPrimary&quot;:&quot;my-pg-cluster-1&quot;,&quot;targetPrimary&quot;:&quot;my-pg-cluster-1&quot;}\n<\/pre><\/div>\n\n\n<p>This gives you the PostgreSQL as well as the operator logs. Both, the &#8220;status&#8221; and the &#8220;logs&#8221; command are essential for troubleshooting.<\/p>\n\n\n\n<p>In the next post we&#8217;ll look at scaling the cluster up and down.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>As we&#8217;re getting more and more familiar with CloudNativePG, now it&#8217;s time to get more information about our cluster, either for monitoring or troubleshooting purposes. Getting information about the general state of our cluster can be easily done by using kubectl. For listing the global state of our cluster, you can do: As we&#8217;ve seen [&hellip;]<\/p>\n","protected":false},"author":29,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[955,229,198,1320],"tags":[77],"type_dbi":[],"class_list":["post-33547","post","type-post","status-publish","format-standard","hentry","category-cloud","category-database-administration-monitoring","category-database-management","category-devops","tag-postgresql"],"acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v27.2 (Yoast SEO v27.2) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>CloudNativePG \u2013 The kubectl plugin - dbi Blog<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"CloudNativePG \u2013 The kubectl plugin\" \/>\n<meta property=\"og:description\" content=\"As we&#8217;re getting more and more familiar with CloudNativePG, now it&#8217;s time to get more information about our cluster, either for monitoring or troubleshooting purposes. Getting information about the general state of our cluster can be easily done by using kubectl. For listing the global state of our cluster, you can do: As we&#8217;ve seen [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/\" \/>\n<meta property=\"og:site_name\" content=\"dbi Blog\" \/>\n<meta property=\"article:published_time\" content=\"2024-06-11T11:44:46+00:00\" \/>\n<meta name=\"author\" content=\"Daniel Westermann\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@westermanndanie\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Daniel Westermann\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/\"},\"author\":{\"name\":\"Daniel Westermann\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"headline\":\"CloudNativePG \u2013 The kubectl plugin\",\"datePublished\":\"2024-06-11T11:44:46+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/\"},\"wordCount\":406,\"commentCount\":2,\"keywords\":[\"PostgreSQL\"],\"articleSection\":[\"Cloud\",\"Database Administration &amp; Monitoring\",\"Database management\",\"DevOps\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/\",\"name\":\"CloudNativePG \u2013 The kubectl plugin - dbi Blog\",\"isPartOf\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\"},\"datePublished\":\"2024-06-11T11:44:46+00:00\",\"author\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\"},\"breadcrumb\":{\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Accueil\",\"item\":\"https:\/\/www.dbi-services.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"CloudNativePG \u2013 The kubectl plugin\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#website\",\"url\":\"https:\/\/www.dbi-services.com\/blog\/\",\"name\":\"dbi Blog\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66\",\"name\":\"Daniel Westermann\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g\",\"caption\":\"Daniel Westermann\"},\"description\":\"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.\",\"sameAs\":[\"https:\/\/x.com\/westermanndanie\"],\"url\":\"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/\"}]}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"CloudNativePG \u2013 The kubectl plugin - dbi Blog","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/","og_locale":"en_US","og_type":"article","og_title":"CloudNativePG \u2013 The kubectl plugin","og_description":"As we&#8217;re getting more and more familiar with CloudNativePG, now it&#8217;s time to get more information about our cluster, either for monitoring or troubleshooting purposes. Getting information about the general state of our cluster can be easily done by using kubectl. For listing the global state of our cluster, you can do: As we&#8217;ve seen [&hellip;]","og_url":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/","og_site_name":"dbi Blog","article_published_time":"2024-06-11T11:44:46+00:00","author":"Daniel Westermann","twitter_card":"summary_large_image","twitter_creator":"@westermanndanie","twitter_misc":{"Written by":"Daniel Westermann","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/#article","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/"},"author":{"name":"Daniel Westermann","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"headline":"CloudNativePG \u2013 The kubectl plugin","datePublished":"2024-06-11T11:44:46+00:00","mainEntityOfPage":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/"},"wordCount":406,"commentCount":2,"keywords":["PostgreSQL"],"articleSection":["Cloud","Database Administration &amp; Monitoring","Database management","DevOps"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/","url":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/","name":"CloudNativePG \u2013 The kubectl plugin - dbi Blog","isPartOf":{"@id":"https:\/\/www.dbi-services.com\/blog\/#website"},"datePublished":"2024-06-11T11:44:46+00:00","author":{"@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66"},"breadcrumb":{"@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/www.dbi-services.com\/blog\/cloudnativepg-the-kubectl-plugin\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Accueil","item":"https:\/\/www.dbi-services.com\/blog\/"},{"@type":"ListItem","position":2,"name":"CloudNativePG \u2013 The kubectl plugin"}]},{"@type":"WebSite","@id":"https:\/\/www.dbi-services.com\/blog\/#website","url":"https:\/\/www.dbi-services.com\/blog\/","name":"dbi Blog","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.dbi-services.com\/blog\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Person","@id":"https:\/\/www.dbi-services.com\/blog\/#\/schema\/person\/8d08e9bd996a89bd75c0286cbabf3c66","name":"Daniel Westermann","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","url":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/31350ceeecb1dd8986339a29bf040d4cd3cd087d410deccd8f55234466d6c317?s=96&d=mm&r=g","caption":"Daniel Westermann"},"description":"Daniel Westermann is Principal Consultant and Technology Leader Open Infrastructure at dbi services. He has more than 15 years of experience in management, engineering and optimization of databases and infrastructures, especially on Oracle and PostgreSQL. Since the beginning of his career, he has specialized in Oracle Technologies and is Oracle Certified Professional 12c and Oracle Certified Expert RAC\/GridInfra. Over time, Daniel has become increasingly interested in open source technologies, becoming \u201cTechnology Leader Open Infrastructure\u201d and PostgreSQL expert. \u00a0Based on community or EnterpriseDB tools, he develops and installs complex high available solutions with PostgreSQL. He is also a certified PostgreSQL Plus 9.0 Professional and a Postgres Advanced Server 9.4 Professional. He is a regular speaker at PostgreSQL conferences in Switzerland and Europe. Today Daniel is also supporting our customers on AWS services such as AWS RDS, database migrations into the cloud, EC2 and automated infrastructure management with AWS SSM (System Manager). He is a certified AWS Solutions Architect Professional. Prior to dbi services, Daniel was Management System Engineer at LC SYSTEMS-Engineering AG in Basel. Before that, he worked as Oracle Developper &amp;\u00a0Project Manager at Delta Energy Solutions AG in Basel (today Powel AG). Daniel holds a diploma in Business Informatics (DHBW, Germany). His branch-related experience mainly covers the pharma industry, the financial sector, energy, lottery and telecommunications.","sameAs":["https:\/\/x.com\/westermanndanie"],"url":"https:\/\/www.dbi-services.com\/blog\/author\/daniel-westermann\/"}]}},"_links":{"self":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/33547","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/users\/29"}],"replies":[{"embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/comments?post=33547"}],"version-history":[{"count":12,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/33547\/revisions"}],"predecessor-version":[{"id":33587,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/posts\/33547\/revisions\/33587"}],"wp:attachment":[{"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/media?parent=33547"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/categories?post=33547"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/tags?post=33547"},{"taxonomy":"type","embeddable":true,"href":"https:\/\/www.dbi-services.com\/blog\/wp-json\/wp\/v2\/type_dbi?post=33547"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}