Skip to content

Instantly share code, notes, and snippets.

@kvudata
kvudata / default.conf
Created July 18, 2018 19:56
Nginx reverse proxy config
server {
listen 80;
server_name localhost;
# error logs location when running nginx-debug
error_log /etc/nginx/logs/error.log debug;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
@kvudata
kvudata / label-ns.yaml
Created June 27, 2018 20:20
Use Helm hook to add labels to a namespace before chart installation
# This hook depends on helm creating the target namespace if it doesn't exist
# before the hook is called. This is the case on Helm v2.9.1
apiVersion: batch/v1
kind: Job
metadata:
name: label-ns
namespace: kube-system
labels:
release: {{ .Release.Name }}
heritage: {{ .Release.Service }}
@kvudata
kvudata / es-stateful.yaml
Created June 19, 2018 01:30
Elasticsearch on kubernetes
apiVersion: apps/v1
kind: StatefulSet
metadata:
name: elasticsearch
spec:
selector:
matchLabels: &POD_LABELS
app: elasticsearch
serviceName: elasticsearch
replicas: 1