Skip to content

Instantly share code, notes, and snippets.

@joatmon08
joatmon08 / hello-stateful-types-v1.go
Created October 3, 2018 12:10
Hello Stateful types.go V1
package v1alpha1
import (
appsv1 "k8s.io/api/apps/v1"
corev1 "k8s.io/api/core/v1"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
)
// +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
@joatmon08
joatmon08 / hello-stateful-cr-v1yaml
Created October 3, 2018 12:00
Hello Stateful CR v1
apiVersion: "hello-stateful.example.com/v1alpha1"
kind: "HelloStateful"
metadata:
name: "minikube-hello-stateful"
spec:
persistentVolume:
metadata:
name: hello-stateful-pv
spec:
storageClassName: standard
---
apiVersion: v1
kind: Service
metadata:
name: hello-stateful
labels:
app: hello-stateful
spec:
clusterIP: None
selector:
@joatmon08
joatmon08 / aws-pvc.yaml
Created May 20, 2018 12:09
20180520-PersistentVolumeClaim
---
apiVersion: v1
kind: PersistentVolumeClaim
metadata:
labels:
app: hello-stateful
name: joatmon08-pvc
spec:
accessModes:
- ReadWriteOnce
@joatmon08
joatmon08 / aws-pv.yaml
Created May 20, 2018 12:09
20180529-PersistentVolume
---
apiVersion: v1
kind: PersistentVolume
metadata:
name: joatmon08-pv
spec:
storageClassName: gp2
accessModes:
- ReadWriteOnce
capacity:
@joatmon08
joatmon08 / aws-statefulset.yaml
Created May 20, 2018 11:33
20190520-StatefulSet
---
apiVersion: v1
kind: Service
metadata:
name: hello-stateful
labels:
app: hello-stateful
spec:
clusterIP: None
selector:
@joatmon08
joatmon08 / 201803-blog-consulonk8s.yaml
Created March 17, 2018 20:04
Consul On Kubernetes: No Persistent Volume
---
apiVersion: v1
kind: Service
metadata:
name: consul
labels:
name: consul
spec:
clusterIP: None
ports:
@joatmon08
joatmon08 / k8s-istio-route-default-green.yaml
Last active December 12, 2017 22:51
K8s Istio - Route Configuration Default Green
---
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
name: turquoise-default
spec:
destination:
name: turquoise
precedence: 4
route:
@joatmon08
joatmon08 / k8s-istio-route-canary.yaml
Created December 11, 2017 01:19
K8s Istio - Route Configuration Canary
---
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
name: turquoise-canary
spec:
destination:
name: turquoise
precedence: 3
route:
@joatmon08
joatmon08 / k8s-istio-route-test-green.yaml
Last active December 11, 2017 01:05
K8s Istio - Route Configuration Test Green
---
apiVersion: config.istio.io/v1alpha2
kind: RouteRule
metadata:
name: turquoise-test-green
spec:
destination:
name: turquoise
precedence: 2
match: