Skip to content

Instantly share code, notes, and snippets.

View karthikeayan's full-sized avatar
🎯
Focusing

Karthikeyan karthikeayan

🎯
Focusing
View GitHub Profile
root@puppetmaster:/etc/puppetlabs/puppetdb/conf.d# cat /etc/puppetlabs/puppetdb/conf.d/puppetdb.conf
[main]
server_urls=https://localhost:8081
@karthikeayan
karthikeayan / hapijs-rest-api-tutorial.md
Created July 23, 2017 19:11 — forked from agendor/hapijs-rest-api-tutorial.md
A practical introduction to building a RESTful API with the hapi.js server framework for Node.js
@karthikeayan
karthikeayan / webpack.config.js
Created February 24, 2018 19:26
webpack 3 basic loaders
module.exports = {
entry: "./entry.js",
output: {
path: __dirname,
filename: "bundle.js"
},
module: {
rules: [{
test: /\.css$/,
use: ["style-loader", "css-loader"]
@karthikeayan
karthikeayan / kubernetes-dns-dashboard-crash-README.md
Last active May 30, 2018 20:03
kubernetes dns and dashboard pod crashing
systemctl stop kubelet
systemctl stop docker
iptables --flush
iptables -tnat --flush
systemctl start kubelet
systemctl start docker
PUT _template/logstash-template
{
"index_patterns": "logstash-*",
"settings": {
"number_of_shards": 1
},
"mappings": {
"fluentd": {
"properties": {
"@timestamp": {
[
{
"_id": "f0767c10-d29f-11e8-9dcb-a75312df94f7",
"_type": "dashboard",
"_source": {
"title": "NGINX Dashboard",
"hits": 0,
"description": "",
"panelsJSON": "[{\"panelIndex\":\"1\",\"gridData\":{\"x\":0,\"y\":0,\"w\":48,\"h\":15,\"i\":\"1\"},\"embeddableConfig\":{\"mapCenter\":[16.636191878397664,23.73046875],\"mapZoom\":2},\"id\":\"e7241f10-d29e-11e8-9dcb-a75312df94f7\",\"type\":\"visualization\",\"version\":\"6.3.2\"},{\"panelIndex\":\"2\",\"gridData\":{\"x\":32,\"y\":15,\"w\":16,\"h\":7,\"i\":\"2\"},\"embeddableConfig\":{},\"id\":\"14e70e80-d29f-11e8-9dcb-a75312df94f7\",\"type\":\"visualization\",\"version\":\"6.3.2\"},{\"panelIndex\":\"4\",\"gridData\":{\"x\":23,\"y\":22,\"w\":21,\"h\":12,\"i\":\"4\"},\"embeddableConfig\":{},\"id\":\"5517b450-d29f-11e8-9dcb-a75312df94f7\",\"type\":\"visualization\",\"version\":\"6.3.2\"},{\"panelIndex\":\"5\",\"gridData\":{\"x\":0,\"y\":15,\"w\":16,\"h\":7,\"i\":\"5\"},\"embeddableConfig\":{},\"id\":\"78e5a8b0-d29f-11e8-9dcb-a75312df
---
kind: Deployment
apiVersion: extensions/v1beta1
metadata:
name: kafka-broker0
spec:
template:
metadata:
labels:
app: kafka
policies:
- name: high-risk-security-groups-remediate
resource: security-group
description: |
Remove any rule from a security group that allows 0.0.0.0/0 or ::/0 (IPv6) ingress
and notify the user who added the violating rule.
mode:
type: cloudtrail
role: arn:aws:iam::<account_number>:role/<role_name>
events:
annotations: {}
awsRegion: us-east-2
awsRole: <role_name> #arn not required, just a role name
awsAccessKeyId:
awsSecretAccessKey:
logGroupName: <log_group_name_in_cloudwatch>
rbac:
## If true, create and use RBAC resources
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: kube2iam
labels:
app: kube2iam
namespace: kube-system
spec:
updateStrategy:
type: RollingUpdate