본문 바로가기
Kubernetes

[Kubernets][Rancher] Pod Metrics 보기

by guru_k 2021. 12. 2.
728x90
반응형

 

 

Rancher on Kubernetes (쿠버네티스 클러스터에 Rancher 설치)

Rancher Rancher는 다양한 인프라에 구성된 Cluster들을 손쉽게 관리해주는 툴이다. Rancher를 이용해서 사용자는 Kuberntes 를 손쉽게 배포하고 관리할 수 있다. 그럼 Rancher를 설치하고 대시보드까지 접속

gihyun.com

 

 

Rancher on Kubernetes - 2 (Existing cluster import)

Rancher 설치 이후 다른 클러스터를 현재 설치된 Rancher에 연동 시켜 보자. Import Existing 각각 사용되고 있는 Provider 가 있다면 EKS, AKS, GKE 를 선택하자. 여기선 on-premise 에 설치 된 Cluster를 추가..

gihyun.com

이전에 kubernetes에 Rancher 설치 및 연동 이후 Rancher에서 Pod Metrics 를 볼수 있도록 설정 해보자.

Rancher에서 Workload들의 Metrics을 보기 위해서는 kube-prometheus 설치가 필요하다. 설치는 Rancher 페이지에서 간단하게 설치가 가능하니 아래와 같이 따라하면 손쉽게 설치가 가능하다.

먼저 구성해놓은 Rancher로 접속하여 설정 후 Metrics 셋업이 필요한 Project로 접속한다.

이후 Cluster Tools 버튼을 클릭.

이후 여러 Cluster tools 중에 Monitoring 을 클릭한다.

설치 될 버전을 확인할 수 있으며 특정 namespace를 지정해서 설치도 가능하다.

Next 버튼을 누르면 Cluster type을 선택할 수 있다. On-premise 환경에 구성이 되어있어 Other를 선택. 그리고 Prometheus, Alerting, Grafana 의 설정등을 변경 할 수 있다. 특별히 변경 할 것이 없다면 Install 버튼을 누르자.

아래와 같이 터미널이 자동적으로 팝업되고 helm 을 통해서 설치가 진행되며 완료될 때 까지 대기한다.

helm upgrade --install=true --namespace=cattle-monitoring-system --timeout=10m0s --values=/home/shell/helm/values-rancher-monitoring-crd-100.0.0-up16.6.0.yaml --version=100.0.0+up16.6.0 --wait=true rancher-monitoring-crd /home/shell/helm/rancher-monitoring-crd-100.0.0-up16.6.0.tgz
Release "rancher-monitoring-crd" does not exist. Installing it now.
creating 5 resource(s)
beginning wait for 5 resources with timeout of 10m0s
Starting delete for "rancher-monitoring-crd-create" Job
jobs.batch "rancher-monitoring-crd-create" not found
creating 1 resource(s)
Watching for changes to Job rancher-monitoring-crd-create with timeout of 10m0s
Add/Modify event for rancher-monitoring-crd-create: ADDED
rancher-monitoring-crd-create: Jobs active: 0, jobs failed: 0, jobs succeeded: 0
Add/Modify event for rancher-monitoring-crd-create: MODIFIED
rancher-monitoring-crd-create: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
Add/Modify event for rancher-monitoring-crd-create: MODIFIED
Starting delete for "rancher-monitoring-crd-create" Job
NAME: rancher-monitoring-crd
LAST DEPLOYED: Thu Dec 2 09:31:34 2021
NAMESPACE: cattle-monitoring-system
STATUS: deployed
REVISION: 1
TEST SUITE: None
---------------------------------------------------------------------
SUCCESS: helm upgrade --install=true --namespace=cattle-monitoring-system --timeout=10m0s --values=/home/shell/helm/values-rancher-monitoring-crd-100.0.0-up16.6.0.yaml --version=100.0.0+up16.6.0 --wait=true rancher-monitoring-crd /home/shell/helm/rancher-monitoring-crd-100.0.0-up16.6.0.tgz
---------------------------------------------------------------------
helm upgrade --install=true --namespace=cattle-monitoring-system --timeout=10m0s --values=/home/shell/helm/values-rancher-monitoring-100.0.0-up16.6.0.yaml --version=100.0.0+up16.6.0 --wait=true rancher-monitoring /home/shell/helm/rancher-monitoring-100.0.0-up16.6.0.tgz
Release "rancher-monitoring" does not exist. Installing it now.
Starting delete for "rancher-monitoring-admission" PodSecurityPolicy
podsecuritypolicies.policy "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission" ServiceAccount
serviceaccounts "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission" ClusterRole
clusterroles.rbac.authorization.k8s.io "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission" ClusterRoleBinding
clusterrolebindings.rbac.authorization.k8s.io "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission" Role
roles.rbac.authorization.k8s.io "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission" RoleBinding
rolebindings.rbac.authorization.k8s.io "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission-create" Job
jobs.batch "rancher-monitoring-admission-create" not found
creating 1 resource(s)
Watching for changes to Job rancher-monitoring-admission-create with timeout of 10m0s
Add/Modify event for rancher-monitoring-admission-create: ADDED
rancher-monitoring-admission-create: Jobs active: 0, jobs failed: 0, jobs succeeded: 0
Add/Modify event for rancher-monitoring-admission-create: MODIFIED
rancher-monitoring-admission-create: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
Add/Modify event for rancher-monitoring-admission-create: MODIFIED
Starting delete for "alertmanager-rancher-monitoring-alertmanager" Secret
secrets "alertmanager-rancher-monitoring-alertmanager" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission" PodSecurityPolicy
Starting delete for "rancher-monitoring-admission" ServiceAccount
Starting delete for "rancher-monitoring-admission" ClusterRole
Starting delete for "rancher-monitoring-admission" ClusterRoleBinding
Starting delete for "rancher-monitoring-admission" Role
Starting delete for "rancher-monitoring-admission" RoleBinding
Starting delete for "rancher-monitoring-admission-create" Job
creating 146 resource(s)
beginning wait for 146 resources with timeout of 10m0s
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 0 out of 10 expected pods are ready
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 0 out of 10 expected pods are ready
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 0 out of 10 expected pods are ready
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 0 out of 10 expected pods are ready
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 0 out of 10 expected pods are ready
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 2 out of 10 expected pods are ready
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 3 out of 10 expected pods are ready
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 3 out of 10 expected pods are ready
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 4 out of 10 expected pods are ready
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 8 out of 10 expected pods are ready
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 9 out of 10 expected pods are ready
DaemonSet is not ready: cattle-monitoring-system/rancher-monitoring-prometheus-node-exporter. 9 out of 10 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Deployment is not ready: cattle-monitoring-system/rancher-monitoring-grafana. 0 out of 1 expected pods are ready
Starting delete for "rancher-monitoring-admission" PodSecurityPolicy
podsecuritypolicies.policy "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission" ServiceAccount
serviceaccounts "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission" ClusterRole
clusterroles.rbac.authorization.k8s.io "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission" ClusterRoleBinding
clusterrolebindings.rbac.authorization.k8s.io "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission" Role
roles.rbac.authorization.k8s.io "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission" RoleBinding
rolebindings.rbac.authorization.k8s.io "rancher-monitoring-admission" not found
creating 1 resource(s)
Starting delete for "rancher-monitoring-admission-patch" Job
jobs.batch "rancher-monitoring-admission-patch" not found
creating 1 resource(s)
Watching for changes to Job rancher-monitoring-admission-patch with timeout of 10m0s
Add/Modify event for rancher-monitoring-admission-patch: ADDED
rancher-monitoring-admission-patch: Jobs active: 0, jobs failed: 0, jobs succeeded: 0
Add/Modify event for rancher-monitoring-admission-patch: MODIFIED
rancher-monitoring-admission-patch: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
Add/Modify event for rancher-monitoring-admission-patch: MODIFIED
Starting delete for "rancher-monitoring-patch-sa" Job
jobs.batch "rancher-monitoring-patch-sa" not found
creating 1 resource(s)
Watching for changes to Job rancher-monitoring-patch-sa with timeout of 10m0s
Add/Modify event for rancher-monitoring-patch-sa: ADDED
rancher-monitoring-patch-sa: Jobs active: 0, jobs failed: 0, jobs succeeded: 0
Add/Modify event for rancher-monitoring-patch-sa: MODIFIED
rancher-monitoring-patch-sa: Jobs active: 1, jobs failed: 0, jobs succeeded: 0
Add/Modify event for rancher-monitoring-patch-sa: MODIFIED
Starting delete for "rancher-monitoring-admission" PodSecurityPolicy
Starting delete for "rancher-monitoring-admission" ServiceAccount
Starting delete for "rancher-monitoring-admission" ClusterRole
Starting delete for "rancher-monitoring-admission" ClusterRoleBinding
Starting delete for "rancher-monitoring-admission" Role
Starting delete for "rancher-monitoring-admission" RoleBinding
Starting delete for "rancher-monitoring-admission-patch" Job
Starting delete for "rancher-monitoring-patch-sa" Job
NAME: rancher-monitoring
LAST DEPLOYED: Thu Dec 2 09:32:00 2021
NAMESPACE: cattle-monitoring-system
STATUS: deployed
REVISION: 1
NOTES:
rancher-monitoring has been installed. Check its status by running:
kubectl --namespace cattle-monitoring-system get pods -l "release=rancher-monitoring"
Visit https://github.com/prometheus-operator/kube-prometheus for instructions on how to create & configure Alertmanager and Prometheus instances using the Operator.
---------------------------------------------------------------------
SUCCESS: helm upgrade --install=true --namespace=cattle-monitoring-system --timeout=10m0s --values=/home/shell/helm/values-rancher-monitoring-100.0.0-up16.6.0.yaml --version=100.0.0+up16.6.0 --wait=true rancher-monitoring /home/shell/helm/rancher-monitoring-100.0.0-up16.6.0.tgz
---------------------------------------------------------------------

이후 메뉴바에서 Workload -> Pods 클릭 후 확인이 필요한 Pod의 이름을 클릭한다. 이후 기존 메뉴에서 Metrics 가 추가된 것이 보이며 해당 탭을 클릭 시 Pod Metrics를 확인 할 수 있다.

728x90
반응형

댓글0