Skip to content

Instantly share code, notes, and snippets.

apiVersion: v1
kind: PersistentVolumeClaim
metadata:
# This name uniquely identifies the PVC. This is used in deployment.
name: minio-pv-claim
spec:
# Read more about access modes here: http://kubernetes.io/docs/user-guide/persistent-volumes/#access-modes
accessModes:
# The volume is mounted as read-write by a single node
- ReadWriteOnce
apiVersion: v1
kind: Service
metadata:
# This name uniquely identifies the service
name: minio-service
spec:
type: LoadBalancer
ports:
- port: 9000
targetPort: 9000
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: nginx
name: nginx-deploy
spec:
replicas: 1
selector:
matchLabels:
apiVersion: apps/v1
kind: Deployment
metadata:
labels:
run: nginx
name: nginx-deploy
spec:
replicas: 1
selector:
matchLabels:
kind: PersistentVolumeClaim
apiVersion: v1
metadata:
name: local-hostpath-pvc
spec:
storageClassName: openebs-hostpath
accessModes:
- ReadWriteOnce
resources:
requests:
#Hellowhale-Deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-whale
spec:
replicas: 5
selector:
matchLabels:
apiVersion: v1
kind: Service
metadata:
name: hello-whale-svc
labels:
app: hello-whale-app
spec:
selector:
app: hello-whale-app
type: NodePort
#Hellowhale-Deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-whale
spec:
replicas: 5
strategy:
type: RollingUpdate
rollingUpdate:
apiVersion: apps/v1
kind: Deployment
metadata:
name: hello-blue-whale
spec:
replicas: 5
selector:
matchLabels:
app: hello-whale-app
version: blue
apiVersion: v1
kind: Service
metadata:
name: hello-whale-svc
labels:
app: hello-whale-app
spec:
selector:
app: hello-whale-app
version: blue