Skip to content

Instantly share code, notes, and snippets.

View alok87's full-sized avatar
🎧
Working from home

Alok Kumar Singh alok87

🎧
Working from home
View GitHub Profile
package main
import (
"fmt"
)
type Service interface {
Do()
}
@alok87
alok87 / gist:e46a7f9a79ef6d1da6964a035be2cfb9
Created February 29, 2020 10:31
weave-servicemonitor.yaml
apiVersion: monitoring.coreos.com/v1
kind: ServiceMonitor
metadata:
name: weave-net
labels:
k8s-app: weave-net
namespace: monitoring
spec:
jobLabel: k8s-app
selector:
apiVersion: v1
kind: Service
metadata:
labels:
k8s-app: weave-net
name: weave-net
spec:
clusterIP: None
ports:
- name: weave-metrics
@alok87
alok87 / node-dns-local-servicemonitor-service.yaml
Created December 12, 2019 10:01
node-dns-local-servicemonitor-service.yaml
apiVersion: v1
kind: Service
metadata:
labels:
k8s-addon: coredns.addons.k8s.io
k8s-app: node-local-dns
kubernetes.io/cluster-service: "true"
kubernetes.io/name: NodeLocalDNS
name: node-local-dns
namespace: kube-system
apiVersion: autoscaling/v1
kind: HorizontalPodAutoscaler
metadata:
name: {{ name }}
namespace: {{ namespace }}
spec:
metrics:
- type: Object
object:
metricName: {{ hpa.metrics_metric_name }}
apiVersion: apps/v1beta2
kind: Deployment
metadata:
labels:
app: kube-state-metrics
name: kube-state-metrics
namespace: monitoring
spec:
replicas: 1
selector:
@alok87
alok87 / gist:c09243f0d61772bb1a7b93ce9a295362
Created August 25, 2018 20:59
getloadBalancerByTag.go
package main
import (
"fmt"
"strings"
"github.com/aws/aws-sdk-go/aws"
"github.com/aws/aws-sdk-go/aws/credentials"
"github.com/aws/aws-sdk-go/aws/session"
"github.com/aws/aws-sdk-go/service/elb"
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
labels:
name: weave-net
role.kubernetes.io/networking: "1"
name: weave-net
namespace: kube-system
spec:
selector:
@alok87
alok87 / kube.yaml
Created August 31, 2017 12:18 — forked from kamilhristov/kube.yaml
Example kops manifest
apiVersion: kops/v1alpha2
kind: Cluster
metadata:
name: kube.kamilhristov.com
spec:
cloudProvider: aws
etcdClusters:
- etcdMembers:
- instanceGroup: master-1
name: master-1