This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Prometheus configuration to scrape Kubernetes outside the cluster | |
# Change master_ip and api_password to match your master server address and admin password | |
global: | |
scrape_interval: 15s | |
evaluation_interval: 15s | |
scrape_configs: | |
# metrics for the prometheus server | |
- job_name: 'prometheus' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"annotations": { | |
"list": [] | |
}, | |
"description": "Monitors Kubernetes cluster using Prometheus. Shows overall cluster CPU / Memory / Filesystem usage as well as individual pod, containers, systemd services statistics. Uses cAdvisor metrics only.", | |
"editable": true, | |
"gnetId": 315, | |
"graphTooltip": 0, | |
"hideControls": false, | |
"id": 2, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"dashboard": { | |
"title": "Hosts", | |
"description": "Basic host stats: CPU, Memory Usage, Disk Utilisation, Filesystem usage and Predicted time to filesystems filling", | |
"id": null, | |
"rows": [{ | |
"collapse": false, | |
"editable": true, | |
"height": "250px", | |
"panels": [{ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2018-10-22 08:39:01 INFO Starting test | |
2018-10-22 08:39:01 INFO Creating Resource Group | |
2018-10-22 08:39:03 INFO Creating the AKS cluster | |
2018-10-22 08:52:22 INFO Getting cluster credentials | |
2018-10-22 08:52:23 INFO Get Nodes | |
2018-10-22 08:52:26 INFO b'NAME STATUS ROLES AGE VERSION\naks-nodepool1-18093422-0 Ready agent 3m v1.9.11\n' | |
2018-10-22 08:52:26 INFO Applying Deployment | |
2018-10-22 08:52:32 INFO b'deployment.apps/azure-vote-back created\nservice/azure-vote-back created\ndeployment.apps/azure-vote-front created\nservice/azure-vote-front created\n' | |
2018-10-22 08:52:32 INFO Getting external IP | |
2018-10-22 08:56:18 INFO Getting web contents from 104.41.139.254 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -e | |
BACKUP_DIR="/var/tmp/k8sbackup/$(date +%s)" | |
echo "Backing up cluster to ${BACKUP_DIR}" | |
NAMESPACES=$(kubectl get ns -o jsonpath={.items[*].metadata.name}) | |
RESOURCETYPES="${RESOURCETYPES:-"ingress deployment configmap secret svc rc ds networkpolicy statefulset cronjob pvc"}" | |
GLOBALRESOURCES="${GLOBALRESOURCES:-"namespace storageclass clusterrole clusterrolebinding customresourcedefinition"}" | |
mkdir -p ${BACKUP_DIR} |
OlderNewer