Difference between revisions of "Kubectl get deployments -o json grafana"

From wikieduonline
Jump to navigation Jump to search
Tags: Mobile web edit, Mobile edit
 
(4 intermediate revisions by 2 users not shown)
Line 10: Line 10:
 
         "creationTimestamp": "2020-03-29T13:08:57Z",
 
         "creationTimestamp": "2020-03-29T13:08:57Z",
 
         "generation": 24,
 
         "generation": 24,
         "labels": {
+
         "[[labels]]": {
             "app.kubernetes.io/instance": "grafana",
+
             "[[app.kubernetes.io]]/instance": "grafana",
             "app.kubernetes.io/managed-by": "Tiller",
+
             "app.kubernetes.io/managed-by": "[[Tiller]]",
 
             "app.kubernetes.io/name": "grafana",
 
             "app.kubernetes.io/name": "grafana",
 
             "app.kubernetes.io/version": "[[6.7.1]]",
 
             "app.kubernetes.io/version": "[[6.7.1]]",
Line 20: Line 20:
 
         "namespace": "monitoring",
 
         "namespace": "monitoring",
 
         "resourceVersion": "685856644",
 
         "resourceVersion": "685856644",
         "uid": "87232cd6-ff24-4645-a82d-6dfeb67af5a7"
+
         "uid": "87232cd6-ff24-4645-a82d-1234567890"
 
     },
 
     },
 +
    "spec": {
 +
        "progressDeadlineSeconds": 600,
 +
        "replicas": 1,
 +
        "revisionHistoryLimit": 10,
 +
        "selector": {
 +
            "matchLabels": {
 +
                "[[app.kubernetes.io]]/instance": "grafana",
 +
                "app.kubernetes.io/name": "grafana"
 +
            }
 +
        },
 +
        "[[strategy]]": {
 +
            "[[rollingUpdate]]": {
 +
                "maxSurge": "25%",
 +
                "maxUnavailable": "25%"
 +
            },
 +
            "type": "RollingUpdate"
 +
        },
 +
        "template": {
 +
            "metadata": {
 +
                "annotations": {
 +
                    "checksum/config": "69c9869543fadc92e536a385b",
 +
                    "checksum/dashboards-json-config": "77ba184e95e8dc4df3b75d2c990b6da7d0946a88f09be4f84",
 +
                    "checksum/sc-dashboard-provider-config": "01ba4719cb64eeece964e09c058ef8f9805daca546b",
 +
                    "checksum/secret": "bbf43240e893"
 +
                },
 +
                "creationTimestamp": null,
 +
                "labels": {
 +
                    "app.kubernetes.io/instance": "grafana",
 +
                    "app.kubernetes.io/name": "grafana"
 +
                }
 +
            },
 +
            "spec": {
 +
                "containers": [
 +
                    {
 +
                        "env": [
 +
                            {
 +
                                "name": "[[GF_SECURITY_ADMIN_USER]]",
 +
                                "valueFrom": {
 +
                                    "secretKeyRef": {
 +
                                        "key": "admin-user",
 +
                                        "name": "grafana"
 +
                                    }
 +
                                }
 +
                            },
 +
                            {
 +
                                "name": "[[GF_SECURITY_ADMIN_PASSWORD]]",
 +
                                "valueFrom": {
 +
                                    "secretKeyRef": {
 +
                                        "key": "admin-password",
 +
                                        "name": "grafana"
 +
                                    }
 +
                                }
 +
                            },
 +
                            {
 +
                                "name": "[[GF_SMTP_USER]]",
 +
                                "valueFrom": {
 +
                                    "secretKeyRef": {
 +
                                        "key": "user",
 +
                                        "name": "smtp"
 +
                                    }
 +
                                }
 +
                            },
 +
                            {
 +
                                "name": "GF_SMTP_PASSWORD",
 +
                                "valueFrom": {
 +
                                    "secretKeyRef": {
 +
                                        "key": "password",
 +
                                        "name": "smtp"
 +
                                    }
 +
                                }
 +
                            }
 +
                        ],
 +
                        "image": "grafana/grafana:6.7.1",
 +
                        "imagePullPolicy": "IfNotPresent",
 +
                        "[[livenessProbe]]": {
 +
                            "failureThreshold": 10,
 +
                            "httpGet": {
 +
                                "path": "[[/api/health]]",
 +
                                "port": 3000,
 +
                                "scheme": "HTTP"
 +
                            },
 +
                            "initialDelaySeconds": 60,
 +
                            "periodSeconds": 10,
 +
                            "successThreshold": 1,
 +
                            "timeoutSeconds": 30
 +
                        },
 +
                        "name": "grafana",
 +
                        "ports": [
 +
                            {
 +
                                "containerPort": 80,
 +
                                "name": "service",
 +
                                "protocol": "TCP"
 +
                            },
 +
                            {
 +
                                "containerPort": 3000,
 +
                                "name": "grafana",
 +
                                "protocol": "TCP"
 +
                            }
 +
                        ],
 +
                        "[[readinessProbe]]": {
 +
                            "failureThreshold": 3,
 +
                            "httpGet": {
 +
                                "path": "[[/api/health]]",
 +
                                "port": 3000,
 +
                                "scheme": "HTTP"
 +
                            },
 +
                            "periodSeconds": 10,
 +
                            "successThreshold": 1,
 +
                            "timeoutSeconds": 1
 +
                        },
 +
                        "resources": {},
 +
                        "terminationMessagePath": "/dev/termination-log",
 +
                        "terminationMessagePolicy": "File",
 +
                        "volumeMounts": [
 +
                            {
 +
                                "mountPath": "[[/etc/grafana/grafana.ini]]",
 +
                                "name": "config",
 +
                                "subPath": "grafana.ini"
 +
                            },
 +
                            {
 +
                                "mountPath": "[[/var/lib/grafana]]",
 +
                                "name": "storage"
 +
                            },
 +
                            {
 +
                                "mountPath": "[[/etc/grafana/provisioning/datasources/datasources.yaml]]",
 +
                                "name": "config",
 +
                                "subPath": "datasources.yaml"
 +
                            },
 +
                            {
 +
                                "mountPath": "[[/etc/grafana/provisioning/dashboards/dashboardproviders.yaml]]",
 +
                                "name": "config",
 +
                                "subPath": "dashboardproviders.yaml"
 +
                            }
 +
                        ]
 +
                    }
 +
                ],
 +
                "[[dnsPolicy]]": "ClusterFirst",
 +
                "[[initContainers]]": [
 +
                    {
 +
                        "command": [
 +
                            "chown",
 +
                            "-R",
 +
                            "[[472:]]",
 +
                            "[[/var/lib/grafana]]"
 +
                        ],
 +
                        "image": "busybox:1.31.1",
 +
                        "imagePullPolicy": "IfNotPresent",
 +
                        "name": "init-chown-data",
 +
                        "resources": {},
 +
                        "securityContext": {
 +
                            "runAsUser": 0
 +
                        },
 +
                        "terminationMessagePath": "/dev/termination-log",
 +
                        "terminationMessagePolicy": "File",
 +
                        "volumeMounts": [
 +
                            {
 +
                                "mountPath": "/var/lib/grafana",
 +
                                "name": "storage"
 +
                            }
 +
                        ]
 +
                    },
 +
                    {
 +
                        "args": [
 +
                            "-c",
 +
                            "mkdir -p /var/lib/grafana/dashboards/default \u0026\u0026 /bin/sh /etc/grafana/download_dashboards.sh"
 +
                        ],
 +
                        "command": [
 +
                            "/bin/sh"
 +
                        ],
 +
                        "image": "curlimages/curl:7.68.0",
 +
                        "imagePullPolicy": "IfNotPresent",
 +
                        "name": "download-dashboards",
 +
                        "resources": {},
 +
                        "terminationMessagePath": "/dev/termination-log",
 +
                        "terminationMessagePolicy": "File",
 +
                        "volumeMounts": [
 +
                            {
 +
                                "mountPath": "/etc/grafana/download_dashboards.sh",
 +
                                "name": "config",
 +
                                "subPath": "download_dashboards.sh"
 +
                            },
 +
                            {
 +
                                "mountPath": "/var/lib/grafana",
 +
                                "name": "storage"
 +
                            }
 +
                        ]
 +
                    }
 +
                ],
 +
                "[[restartPolicy]]": "Always",
 +
                "schedulerName": "default-scheduler",
 +
                "securityContext": {
 +
                    "fsGroup": 472,
 +
                    "runAsUser": 472
 +
                },
 +
                "serviceAccount": "grafana",
 +
                "serviceAccountName": "grafana",
 +
                "terminationGracePeriodSeconds": 30,
 +
                "volumes": [
 +
                    {
 +
                        "[[configMap]]": {
 +
                            "defaultMode": 420,
 +
                            "name": "grafana"
 +
                        },
 +
                        "name": "config"
 +
                    },
 +
                    {
 +
                        "configMap": {
 +
                            "defaultMode": 420,
 +
                            "name": "grafana-dashboards-gitlab"
 +
                        },
 +
                        "name": "dashboards-gitlab"
 +
                    },
 +
                    {
 +
                        "configMap": {
 +
                            "defaultMode": 420,
 +
                            "name": "grafana-dashboards-ingress"
 +
                        },
 +
                        "name": "dashboards-ingress"
 +
                    },
 +
                    {
 +
                        "configMap": {
 +
                            "defaultMode": 420,
 +
                            "name": "grafana-dashboards-kubernetes"
 +
                        },
 +
                        "name": "dashboards-kubernetes"
 +
                    },
 +
                    {
 +
                        "configMap": {
 +
                            "defaultMode": 420,
 +
                            "name": "grafana-dashboards-prometheus"
 +
                        },
 +
                        "name": "dashboards-prometheus"
 +
                    },
 +
                    {
 +
                        "name": "storage",
 +
                        "[[persistentVolumeClaim]]": {
 +
                            "claimName": "[[grafana]]"
 +
                        }
 +
                    }
 +
                ]
 +
            }
 +
        }
 +
    },
 +
    "status": {
 +
        "availableReplicas": 1,
 +
        "conditions": [
 +
            {
 +
                "lastTransitionTime": "2021-12-29T08:09:51Z",
 +
                "lastUpdateTime": "2021-12-29T09:29:18Z",
 +
                "message": "ReplicaSet \"grafana-5bf884987c\" has successfully progressed.",
 +
                "reason": "NewReplicaSetAvailable",
 +
                "status": "True",
 +
                "type": "Progressing"
 +
            },
 +
            {
 +
                "lastTransitionTime": "2022-06-16T01:20:01Z",
 +
                "lastUpdateTime": "2022-06-16T01:20:01Z",
 +
                "message": "[[Deployment has minimum availability]].",
 +
                "reason": "MinimumReplicasAvailable",
 +
                "status": "True",
 +
                "type": "Available"
 +
            }
 +
        ],
 +
        "observedGeneration": 24,
 +
        "readyReplicas": 1,
 +
        "replicas": 1,
 +
        "updatedReplicas": 1
 +
    }
 +
}
  
 
+
== Related ==
 +
* <code>[[kubectl get deployments -o json -A]]</code>
 +
* <code>[[kubectl get deployments -o yaml]]</code>
  
 
== See also ==
 
== See also ==
 +
* {{kubectl get deployment}}
 
* {{Kubernetes deployments}}
 
* {{Kubernetes deployments}}
  
 
[[Category:Kubectl]]
 
[[Category:Kubectl]]

Latest revision as of 16:07, 28 March 2023

kubectl get deployments -o json grafana
{
   "apiVersion": "apps/v1",
   "kind": "Deployment",
   "metadata": {
       "annotations": {
           "deployment.kubernetes.io/revision": "2"
       },
       "creationTimestamp": "2020-03-29T13:08:57Z",
       "generation": 24,
       "labels": {
           "app.kubernetes.io/instance": "grafana",
           "app.kubernetes.io/managed-by": "Tiller",
           "app.kubernetes.io/name": "grafana",
           "app.kubernetes.io/version": "6.7.1",
           "helm.sh/chart": "grafana-5.5.7"
       },
       "name": "grafana",
       "namespace": "monitoring",
       "resourceVersion": "685856644",
       "uid": "87232cd6-ff24-4645-a82d-1234567890"
   },
   "spec": {
       "progressDeadlineSeconds": 600,
       "replicas": 1,
       "revisionHistoryLimit": 10,
       "selector": {
           "matchLabels": {
               "app.kubernetes.io/instance": "grafana",
               "app.kubernetes.io/name": "grafana"
           }
       },
       "strategy": {
           "rollingUpdate": {
               "maxSurge": "25%",
               "maxUnavailable": "25%"
           },
           "type": "RollingUpdate"
       },
       "template": {
           "metadata": {
               "annotations": {
                   "checksum/config": "69c9869543fadc92e536a385b",
                   "checksum/dashboards-json-config": "77ba184e95e8dc4df3b75d2c990b6da7d0946a88f09be4f84",
                   "checksum/sc-dashboard-provider-config": "01ba4719cb64eeece964e09c058ef8f9805daca546b",
                   "checksum/secret": "bbf43240e893"
               },
               "creationTimestamp": null,
               "labels": {
                   "app.kubernetes.io/instance": "grafana",
                   "app.kubernetes.io/name": "grafana"
               }
           },
           "spec": {
               "containers": [
                   {
                       "env": [
                           {
                               "name": "GF_SECURITY_ADMIN_USER",
                               "valueFrom": {
                                   "secretKeyRef": {
                                       "key": "admin-user",
                                       "name": "grafana"
                                   }
                               }
                           },
                           {
                               "name": "GF_SECURITY_ADMIN_PASSWORD",
                               "valueFrom": {
                                   "secretKeyRef": {
                                       "key": "admin-password",
                                       "name": "grafana"
                                   }
                               }
                           },
                           {
                               "name": "GF_SMTP_USER",
                               "valueFrom": {
                                   "secretKeyRef": {
                                       "key": "user",
                                       "name": "smtp"
                                   }
                               }
                           },
                           {
                               "name": "GF_SMTP_PASSWORD",
                               "valueFrom": {
                                   "secretKeyRef": {
                                       "key": "password",
                                       "name": "smtp"
                                   }
                               }
                           }
                       ],
                       "image": "grafana/grafana:6.7.1",
                       "imagePullPolicy": "IfNotPresent",
                       "livenessProbe": {
                           "failureThreshold": 10,
                           "httpGet": {
                               "path": "/api/health",
                               "port": 3000,
                               "scheme": "HTTP"
                           },
                           "initialDelaySeconds": 60,
                           "periodSeconds": 10,
                           "successThreshold": 1,
                           "timeoutSeconds": 30
                       },
                       "name": "grafana",
                       "ports": [
                           {
                               "containerPort": 80,
                               "name": "service",
                               "protocol": "TCP"
                           },
                           {
                               "containerPort": 3000,
                               "name": "grafana",
                               "protocol": "TCP"
                           }
                       ],
                       "readinessProbe": {
                           "failureThreshold": 3,
                           "httpGet": {
                               "path": "/api/health",
                               "port": 3000,
                               "scheme": "HTTP"
                           },
                           "periodSeconds": 10,
                           "successThreshold": 1,
                           "timeoutSeconds": 1
                       },
                       "resources": {},
                       "terminationMessagePath": "/dev/termination-log",
                       "terminationMessagePolicy": "File",
                       "volumeMounts": [
                           {
                               "mountPath": "/etc/grafana/grafana.ini",
                               "name": "config",
                               "subPath": "grafana.ini"
                           },
                           {
                               "mountPath": "/var/lib/grafana",
                               "name": "storage"
                           },
                           {
                               "mountPath": "/etc/grafana/provisioning/datasources/datasources.yaml",
                               "name": "config",
                               "subPath": "datasources.yaml"
                           },
                           {
                               "mountPath": "/etc/grafana/provisioning/dashboards/dashboardproviders.yaml",
                               "name": "config",
                               "subPath": "dashboardproviders.yaml"
                           }
                       ]
                   }
               ],
               "dnsPolicy": "ClusterFirst",
               "initContainers": [
                   {
                       "command": [
                           "chown",
                           "-R",
                           "472:",
                           "/var/lib/grafana"
                       ],
                       "image": "busybox:1.31.1",
                       "imagePullPolicy": "IfNotPresent",
                       "name": "init-chown-data",
                       "resources": {},
                       "securityContext": {
                           "runAsUser": 0
                       },
                       "terminationMessagePath": "/dev/termination-log",
                       "terminationMessagePolicy": "File",
                       "volumeMounts": [
                           {
                               "mountPath": "/var/lib/grafana",
                               "name": "storage"
                           }
                       ]
                   },
                   {
                       "args": [
                           "-c",
                           "mkdir -p /var/lib/grafana/dashboards/default \u0026\u0026 /bin/sh /etc/grafana/download_dashboards.sh"
                       ],
                       "command": [
                           "/bin/sh"
                       ],
                       "image": "curlimages/curl:7.68.0",
                       "imagePullPolicy": "IfNotPresent",
                       "name": "download-dashboards",
                       "resources": {},
                       "terminationMessagePath": "/dev/termination-log",
                       "terminationMessagePolicy": "File",
                       "volumeMounts": [
                           {
                               "mountPath": "/etc/grafana/download_dashboards.sh",
                               "name": "config",
                               "subPath": "download_dashboards.sh"
                           },
                           {
                               "mountPath": "/var/lib/grafana",
                               "name": "storage"
                           }
                       ]
                   }
               ],
               "restartPolicy": "Always",
               "schedulerName": "default-scheduler",
               "securityContext": {
                   "fsGroup": 472,
                   "runAsUser": 472
               },
               "serviceAccount": "grafana",
               "serviceAccountName": "grafana",
               "terminationGracePeriodSeconds": 30,
               "volumes": [
                   {
                       "configMap": {
                           "defaultMode": 420,
                           "name": "grafana"
                       },
                       "name": "config"
                   },
                   {
                       "configMap": {
                           "defaultMode": 420,
                           "name": "grafana-dashboards-gitlab"
                       },
                       "name": "dashboards-gitlab"
                   },
                   {
                       "configMap": {
                           "defaultMode": 420,
                           "name": "grafana-dashboards-ingress"
                       },
                       "name": "dashboards-ingress"
                   },
                   {
                       "configMap": {
                           "defaultMode": 420,
                           "name": "grafana-dashboards-kubernetes"
                       },
                       "name": "dashboards-kubernetes"
                   },
                   {
                       "configMap": {
                           "defaultMode": 420,
                           "name": "grafana-dashboards-prometheus"
                       },
                       "name": "dashboards-prometheus"
                   },
                   {
                       "name": "storage",
                       "persistentVolumeClaim": {
                           "claimName": "grafana"
                       }
                   }
               ]
           }
       }
   },
   "status": {
       "availableReplicas": 1,
       "conditions": [
           {
               "lastTransitionTime": "2021-12-29T08:09:51Z",
               "lastUpdateTime": "2021-12-29T09:29:18Z",
               "message": "ReplicaSet \"grafana-5bf884987c\" has successfully progressed.",
               "reason": "NewReplicaSetAvailable",
               "status": "True",
               "type": "Progressing"
           },
           {
               "lastTransitionTime": "2022-06-16T01:20:01Z",
               "lastUpdateTime": "2022-06-16T01:20:01Z",
               "message": "Deployment has minimum availability.",
               "reason": "MinimumReplicasAvailable",
               "status": "True",
               "type": "Available"
           }
       ],
       "observedGeneration": 24,
       "readyReplicas": 1,
       "replicas": 1,
       "updatedReplicas": 1
   }
}

Related[edit]

See also[edit]

Advertising: