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
kubectl get services # List all services | |
kubectl get pods # List all pods | |
kubectl get nodes -w # Watch nodes continuously | |
kubectl version # Get version information | |
kubectl cluster-info # Get cluster information | |
kubectl config view # Get the configuration | |
kubectl describe node <node> # Output information about a node | |
kubectl get pods # List the current pods | |
kubectl describe pod <name> # Describe pod <name> | |
kubectl get rc # List the replication controllers |
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
--- | |
apiVersion: v1 | |
kind: ConfigMap | |
metadata: | |
name: filebeat-config | |
namespace: kube-system | |
labels: | |
k8s-app: filebeat | |
kubernetes.io/cluster-service: "true" | |
data: |
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
ELK on Ubuntu Quick Install | |
--------------------------- | |
#Elasticsearch | |
wget -qO - https://artifacts.elastic.co/GPG-KEY-elasticsearch | sudo apt-key add - | |
sudo apt-get update | |
sudo apt-get install apt-transport-https | |
echo "deb https://artifacts.elastic.co/packages/7.x/apt stable main" | sudo tee -a /etc/apt/sources.list.d/elastic-7.x.list | |
sudo apt-get update && sudo apt-get install elasticsearch | |
sudo su | |
vim /etc/elasticsearch/elasticsearch.yml |
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
files: | |
"/etc/filebeat/filebeat.yml": | |
mode: "000755" | |
owner: root | |
group: root | |
content: | | |
filebeat: | |
# List of prospectors to fetch data. | |
prospectors: | |
- |
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
input { | |
beats { | |
host => "localhost" | |
port => 5044 | |
} | |
} | |
filter { | |
if [message] =~ /^#/ { | |
drop { } |
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
kubectl create -f https://raw.githubusercontent.com/kubernetes/dashboard/master/src/deploy/recommended/kubernetes-dashboard.yaml | |
kubectl get pods --namespace kube-system | |
kubectl port-forward kubernetes-dashboard-5569448c6d-jxbhv 8443:8443 --namespace=kube-system | |
git clone https://github.com/dockersamples/k8s-wordsmith-demo | |
cd k8s-wordsmith-demo | |
docker-compose build | |
kubectl apply -f kube-deployment.yml |
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
[ | |
{ | |
"_id": "2b533890-2e91-11e8-8bb5-51894e25f847", | |
"_type": "dashboard", | |
"_source": { | |
"title": "Crypto Monitoring Dashboard", | |
"hits": 0, | |
"description": "", | |
"panelsJSON": "[{\"panelIndex\":\"2\",\"gridData\":{\"x\":8,\"y\":0,\"w\":4,\"h\":3,\"i\":\"2\"},\"id\":\"b8041280-2e0c-11e8-8bb5-51894e25f847\",\"type\":\"visualization\",\"version\":\"6.2.2\"},{\"panelIndex\":\"3\",\"gridData\":{\"x\":8,\"y\":6,\"w\":4,\"h\":3,\"i\":\"3\"},\"id\":\"630416d0-2e94-11e8-8bb5-51894e25f847\",\"type\":\"visualization\",\"version\":\"6.2.2\"},{\"panelIndex\":\"4\",\"gridData\":{\"x\":8,\"y\":3,\"w\":4,\"h\":3,\"i\":\"4\"},\"id\":\"7f0a0240-2e94-11e8-8bb5-51894e25f847\",\"type\":\"visualization\",\"version\":\"6.2.2\"},{\"panelIndex\":\"5\",\"gridData\":{\"x\":0,\"y\":0,\"w\":8,\"h\":5,\"i\":\"5\"},\"embeddableConfig\":{\"vis\":{\"params\":{\"sort\":{\"columnIndex\":1,\"direction\":\"desc\"}}}},\"id\":\"e8b24750-2e96-11e8-8bb5-51894e25f847\",\"type\":\"visualization\",\"version\":\"6.2.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
sudo apt-get update | |
sudo apt-get install \ | |
apt-transport-https \ | |
ca-certificates \ | |
curl \ | |
software-properties-common | |
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - |
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
/** | |
Copyright 2018 Google LLC. | |
Licensed under the Apache License, Version 2.0 (the "License"); | |
you may not use this file except in compliance with the License. | |
You may obtain a copy of the License at | |
https://www.apache.org/licenses/LICENSE-2.0 | |
Unless required by applicable law or agreed to in writing, software |
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
input { | |
azureblob | |
{ | |
storage_account_name => "yourStorageAccount" | |
storage_access_key => "yourStorageAccessKey" | |
container => "insights-logs-networksecuritygroupflowevent" | |
codec => "json" | |
# Refer https://docs.microsoft.com/en-us/azure/network-watcher/network-watcher-read-nsg-flow-logs | |
# Typical numbers could be 21/9 or 12/2 depends on the nsg log file types | |
file_head_bytes => 12 |
NewerOlder