Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
apiVersion: rbac.authorization.k8s.io/v1
kind: ClusterRoleBinding
metadata:
name: psp:vmware-system-privileged
roleRef:
kind: ClusterRole
name: psp:vmware-system-privileged
apiGroup: rbac.authorization.k8s.io
subjects:
- kind: ServiceAccount
name: sa-priv-user
namespace: yelb
apiVersion: v1
kind: Service
metadata:
name: redis-server
labels:
app: redis-server
tier: cache
spec:
type: ClusterIP
ports:
- port: 6379
selector:
app: redis-server
tier: cache
---
apiVersion: v1
kind: Service
metadata:
name: yelb-db
labels:
app: yelb-db
tier: backenddb
spec:
type: ClusterIP
ports:
- port: 5432
selector:
app: yelb-db
tier: backenddb
---
apiVersion: v1
kind: Service
metadata:
name: yelb-appserver
labels:
app: yelb-appserver
tier: middletier
spec:
type: ClusterIP
ports:
- port: 4567
selector:
app: yelb-appserver
tier: middletier
---
apiVersion: v1
kind: Service
metadata:
name: yelb-ui
labels:
app: yelb-ui
tier: frontend
spec:
type: LoadBalancer
ports:
- port: 80
protocol: TCP
targetPort: 80
selector:
app: yelb-ui
tier: frontend
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: yelb-ui
spec:
selector:
matchLabels:
app: yelb-ui
replicas: 3
template:
metadata:
labels:
app: yelb-ui
tier: frontend
spec:
serviceAccountName: sa-priv-user
containers:
- name: yelb-ui
image: mreferre/yelb-ui:0.3
ports:
- containerPort: 80
securityContext:
privileged: true
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: redis-server
spec:
selector:
matchLabels:
app: redis-server
replicas: 3
template:
metadata:
labels:
app: redis-server
tier: cache
spec:
serviceAccountName: sa-priv-user
containers:
- name: redis-server
image: redis:4.0.2
ports:
- containerPort: 6379
securityContext:
privileged: true
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: yelb-db
spec:
selector:
matchLabels:
app: yelb-db
replicas: 3
template:
metadata:
labels:
app: yelb-db
tier: backenddb
spec:
serviceAccountName: sa-priv-user
containers:
- name: yelb-db
image: mreferre/yelb-db:0.5
ports:
- containerPort: 5432
securityContext:
privileged: true
---
apiVersion: apps/v1
kind: Deployment
metadata:
name: yelb-appserver
spec:
selector:
matchLabels:
app: yelb-appserver
replicas: 3
template:
metadata:
labels:
app: yelb-appserver
tier: middletier
spec:
serviceAccountName: sa-priv-user
containers:
- name: yelb-appserver
image: mreferre/yelb-appserver:0.5
ports:
- containerPort: 4567
securityContext:
privileged: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment