Skip to content

Instantly share code, notes, and snippets.

View vigneshragupathy's full-sized avatar
🎯
Focusing

vignesh vigneshragupathy

🎯
Focusing
View GitHub Profile
import sys
print "hello world"
@vigneshragupathy
vigneshragupathy / stress.test.yaml
Created August 19, 2018 14:39
kubernetes_blog_gist1
spec:
containers:
- image: vish/stress
imagePullPolicy: Always
name: stress-test
resources:
limits:
cpu: "1"
memory: "4Gi"
requests:
@vigneshragupathy
vigneshragupathy / nginx_redirect.conf
Last active August 23, 2018 06:36
Sample nginx redirection
server {
listen 80;
server_name www.XXXX.com;
return 301 https://www.YYYY.com$request_uri;
}
@vigneshragupathy
vigneshragupathy / limit_range.yaml
Last active August 26, 2018 14:22
blog kubernetes limit setting for namespace
apiVersion: v1
kind: LimitRange
metadata:
name: low-usage-limit-range
spec:
limits:
- default:
cpu: 1
memory: 500Mi
defaultRequest:
apiVersion: v1
kind: Pod
metadata:
annotations:
kubernetes.io/limit-ranger: 'LimitRanger plugin set: cpu, memory request for container
stress-test-limited; cpu, memory limit for container stress-test-limited'
creationTimestamp: 2018-08-26T14:23:37Z
generateName: stress-test-limited-58b76c667f-
labels:
pod-template-hash: "1463272239"
@vigneshragupathy
vigneshragupathy / kubernetes-strace-eo.st
Last active September 29, 2018 07:47
strace output for "strace kubectl get endpoints"
openat(AT_FDCWD, "/home/vikki/.kube/cache/discovery/160.0.0.1_6443/autoscaling/v2beta1/serverresources.json", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/home/vikki/.kube/cache/discovery/160.0.0.1_6443/batch/v1/serverresources.json.987875345", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = -1 EACCES (Permission denied)
openat(AT_FDCWD, "/home/vikki/.kube/cache/discovery/160.0.0.1_6443/batch/v1beta1/serverresources.json", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/home/vikki/.kube/cache/discovery/160.0.0.1_6443/policy/v1beta1/serverresources.json.834786845", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = -1 EACCES (Permission denied)
openat(AT_FDCWD, "/home/vikki/.kube/cache/discovery/160.0.0.1_6443/rbac.authorization.k8s.io/v1/serverresources.json", O_RDONLY|O_CLOEXEC) = 5
openat(AT_FDCWD, "/home/vikki/.kube/cache/discovery/160.0.0.1_6443/admissionregistration.k8s.io/v1beta1/serverresources.json.571841542", O_RDWR|O_CREAT|O_EXCL|O_CLOEXEC, 0600) = -1 EACCES (Permission denied)
openat(AT_FDCWD, "/home/vikki/.kube/cache/dis
@vigneshragupathy
vigneshragupathy / replicate_set.yaml
Created September 29, 2018 07:40
yaml file to create a simple replica sets
apiVersion: extensions/v1beta1
kind: ReplicaSet
metadata:
name: replicate-set-vikki
spec:
replicas: 2
template:
metadata:
labels:
system: ReplicaOne
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: v1
kind: Pod
metadata:
creationTimestamp: 2018-09-29T07:38:40Z
generateName: replicate-set-vikki-
labels:
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
name: daemon-set-vikki
spec:
template:
metadata:
labels:
system: DaemonSetOne
spec:
# Please edit the object below. Lines beginning with a '#' will be ignored,
# and an empty file will abort the edit. If an error occurs while saving this file will be
# reopened with the relevant failures.
#
apiVersion: extensions/v1beta1
kind: DaemonSet
metadata:
creationTimestamp: 2018-09-29T13:04:57Z
generation: 2
labels: