Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
J
joohanhong
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
JooHan Hong
joohanhong
Commits
3aa578f8
Commit
3aa578f8
authored
Mar 30, 2021
by
JooHan Hong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
K8s monitoring new init
parent
652385a6
Pipeline
#5297
passed with stages
in 46 seconds
Changes
11
Pipelines
1
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
1664 additions
and
0 deletions
+1664
-0
README.md
DOCKER/PROMETHEUS/INSTALL/K8S/README.md
+751
-0
alert-template-configmap.yaml
DOCKER/PROMETHEUS/INSTALL/K8S/alert-template-configmap.yaml
+178
-0
alertmanager-svc.yaml
DOCKER/PROMETHEUS/INSTALL/K8S/alertmanager-svc.yaml
+17
-0
alertmanager.yaml
DOCKER/PROMETHEUS/INSTALL/K8S/alertmanager.yaml
+47
-0
grafana-datasource.png
DOCKER/PROMETHEUS/INSTALL/K8S/images/grafana-datasource.png
+0
-0
kube-state-cluster-role.yaml
DOCKER/PROMETHEUS/INSTALL/K8S/kube-state-cluster-role.yaml
+68
-0
kube-state-deployment.yaml
DOCKER/PROMETHEUS/INSTALL/K8S/kube-state-deployment.yaml
+40
-0
kube-state-svc.yaml
DOCKER/PROMETHEUS/INSTALL/K8S/kube-state-svc.yaml
+18
-0
kube-state-svcaccount.yaml
DOCKER/PROMETHEUS/INSTALL/K8S/kube-state-svcaccount.yaml
+5
-0
prometheus-config-map.yaml
DOCKER/PROMETHEUS/INSTALL/K8S/prometheus-config-map.yaml
+536
-0
README.md
DOCKER/PROMETHEUS/README.md
+4
-0
No files found.
DOCKER/PROMETHEUS/INSTALL/K8S/README.md
View file @
3aa578f8
This diff is collapsed.
Click to expand it.
DOCKER/PROMETHEUS/INSTALL/K8S/alert-template-configmap.yaml
0 → 100644
View file @
3aa578f8
This diff is collapsed.
Click to expand it.
DOCKER/PROMETHEUS/INSTALL/K8S/alertmanager-svc.yaml
0 → 100644
View file @
3aa578f8
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
alertmanager
namespace
:
monitoring
annotations
:
prometheus.io/scrape
:
'
true'
prometheus.io/path
:
/
prometheus.io/port
:
'
8080'
spec
:
selector
:
app
:
alertmanager
type
:
NodePort
ports
:
-
port
:
9093
targetPort
:
9093
nodePort
:
30005
DOCKER/PROMETHEUS/INSTALL/K8S/alertmanager.yaml
0 → 100644
View file @
3aa578f8
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
name
:
alertmanager
namespace
:
monitoring
spec
:
replicas
:
1
selector
:
matchLabels
:
app
:
alertmanager
template
:
metadata
:
name
:
alertmanager
labels
:
app
:
alertmanager
spec
:
containers
:
-
name
:
alertmanager
image
:
prom/alertmanager:latest
args
:
-
"
--config.file=/etc/alertmanager/config.yml"
-
"
--storage.path=/alertmanager"
ports
:
-
name
:
alertmanager
containerPort
:
9093
volumeMounts
:
-
name
:
config-volume
mountPath
:
/etc/alertmanager
-
name
:
templates-volume
mountPath
:
/etc/alertmanager-templates
-
name
:
alertmanager-storage-volume
mountPath
:
/alertmanager
nodeSelector
:
kubernetes.io/hostname
:
cube02
volumes
:
-
name
:
config-volume
configMap
:
name
:
alertmanager-config
-
name
:
templates-volume
configMap
:
name
:
alertmanager-templates
-
name
:
alertmanager-storage-volume
persistentVolumeClaim
:
claimName
:
alertmanager-pvc
securityContext
:
runAsUser
:
0
DOCKER/PROMETHEUS/INSTALL/K8S/images/grafana-datasource.png
0 → 100644
View file @
3aa578f8
44.6 KB
DOCKER/PROMETHEUS/INSTALL/K8S/kube-state-cluster-role.yaml
0 → 100644
View file @
3aa578f8
apiVersion
:
rbac.authorization.k8s.io/v1
kind
:
ClusterRoleBinding
metadata
:
name
:
kube-state-metrics
roleRef
:
apiGroup
:
rbac.authorization.k8s.io
kind
:
ClusterRole
name
:
kube-state-metrics
subjects
:
-
kind
:
ServiceAccount
name
:
kube-state-metrics
namespace
:
kube-system
---
apiVersion
:
rbac.authorization.k8s.io/v1
kind
:
ClusterRole
metadata
:
name
:
kube-state-metrics
rules
:
-
apiGroups
:
-
"
"
resources
:
[
"
configmaps"
,
"
secrets"
,
"
nodes"
,
"
pods"
,
"
services"
,
"
resourcequotas"
,
"
replicationcontrollers"
,
"
limitranges"
,
"
persistentvolumeclaims"
,
"
persistentvolumes"
,
"
namespaces"
,
"
endpoints"
]
verbs
:
[
"
list"
,
"
watch"
]
-
apiGroups
:
-
extensions
resources
:
[
"
daemonsets"
,
"
deployments"
,
"
replicasets"
,
"
ingresses"
]
verbs
:
[
"
list"
,
"
watch"
]
-
apiGroups
:
-
apps
resources
:
[
"
statefulsets"
,
"
daemonsets"
,
"
deployments"
,
"
replicasets"
]
verbs
:
[
"
list"
,
"
watch"
]
-
apiGroups
:
-
batch
resources
:
[
"
cronjobs"
,
"
jobs"
]
verbs
:
[
"
list"
,
"
watch"
]
-
apiGroups
:
-
autoscaling
resources
:
[
"
horizontalpodautoscalers"
]
verbs
:
[
"
list"
,
"
watch"
]
-
apiGroups
:
-
authentication.k8s.io
resources
:
[
"
tokenreviews"
]
verbs
:
[
"
create"
]
-
apiGroups
:
-
authorization.k8s.io
resources
:
[
"
subjectaccessreviews"
]
verbs
:
[
"
create"
]
-
apiGroups
:
-
policy
resources
:
[
"
poddisruptionbudgets"
]
verbs
:
[
"
list"
,
"
watch"
]
-
apiGroups
:
-
certificates.k8s.io
resources
:
[
"
certificatesigningrequests"
]
verbs
:
[
"
list"
,
"
watch"
]
-
apiGroups
:
-
storage.k8s.io
resources
:
[
"
storageclasses"
,
"
volumeattachments"
]
verbs
:
[
"
list"
,
"
watch"
]
-
apiGroups
:
-
admissionregistration.k8s.io
resources
:
[
"
mutatingwebhookconfigurations"
,
"
validatingwebhookconfigurations"
]
verbs
:
[
"
list"
,
"
watch"
]
-
apiGroups
:
-
networking.k8s.io
resources
:
[
"
networkpolicies"
]
verbs
:
[
"
list"
,
"
watch"
]
DOCKER/PROMETHEUS/INSTALL/K8S/kube-state-deployment.yaml
0 → 100644
View file @
3aa578f8
apiVersion
:
apps/v1
kind
:
Deployment
metadata
:
labels
:
app
:
kube-state-metrics
name
:
kube-state-metrics
namespace
:
kube-system
spec
:
replicas
:
1
selector
:
matchLabels
:
app
:
kube-state-metrics
template
:
metadata
:
labels
:
app
:
kube-state-metrics
spec
:
containers
:
-
image
:
quay.io/coreos/kube-state-metrics:v1.8.0
livenessProbe
:
httpGet
:
path
:
/healthz
port
:
8080
initialDelaySeconds
:
5
timeoutSeconds
:
5
name
:
kube-state-metrics
ports
:
-
containerPort
:
8080
name
:
http-metrics
-
containerPort
:
8081
name
:
telemetry
readinessProbe
:
httpGet
:
path
:
/
port
:
8081
initialDelaySeconds
:
5
timeoutSeconds
:
5
nodeSelector
:
kubernetes.io/os
:
linux
serviceAccountName
:
kube-state-metrics
DOCKER/PROMETHEUS/INSTALL/K8S/kube-state-svc.yaml
0 → 100644
View file @
3aa578f8
apiVersion
:
v1
kind
:
Service
metadata
:
labels
:
app
:
kube-state-metrics
name
:
kube-state-metrics
namespace
:
kube-system
spec
:
clusterIP
:
None
ports
:
-
name
:
http-metrics
port
:
8080
targetPort
:
http-metrics
-
name
:
telemetry
port
:
8081
targetPort
:
telemetry
selector
:
app
:
kube-state-metrics
DOCKER/PROMETHEUS/INSTALL/K8S/kube-state-svcaccount.yaml
0 → 100644
View file @
3aa578f8
apiVersion
:
v1
kind
:
ServiceAccount
metadata
:
name
:
kube-state-metrics
namespace
:
kube-system
DOCKER/PROMETHEUS/INSTALL/K8S/prometheus-config-map.yaml
0 → 100644
View file @
3aa578f8
This diff is collapsed.
Click to expand it.
DOCKER/PROMETHEUS/README.md
View file @
3aa578f8
...
...
@@ -29,4 +29,8 @@ Prometheus을 이용한 www.hongsnet.net Container를 모니터링 한다.
# Monitroing ITEM (Common)
> Prometheus Alert Rule을 이용한 각종 Metric 기준 및 구성을 진행한다.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment