Created
August 7, 2018 15:12
-
-
Save jnahelou/7a56bc7922df88c23e23596a9af32eeb to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: networking.istio.io/v1alpha3 | |
kind: DestinationRule | |
metadata: | |
name: nfs-web | |
spec: | |
host: nfs-web-svc | |
trafficPolicy: | |
loadBalancer: | |
simple: RANDOM | |
--- | |
apiVersion: networking.istio.io/v1alpha3 | |
kind: VirtualService | |
metadata: | |
name: nfs-web | |
spec: | |
hosts: | |
- "web.35.190.201.125.xip.io" | |
gateways: | |
- helloworld-gateway | |
http: | |
- route: | |
- destination: | |
host: nfs-web-svc | |
port: | |
number: 80 | |
weight: 100 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nfs-web-svc | |
annotations: | |
cloud.google.com/load-balancer-type: Internal | |
labels: | |
app: "nfs-web" | |
spec: | |
ports: | |
- name: http | |
port: 80 | |
protocol: TCP | |
targetPort: 80 | |
selector: | |
app: nfs-web | |
sessionAffinity: None | |
#type: ClusterIP | |
type: LoadBalancer | |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
app: nfs-web | |
name: nfs-web | |
spec: | |
selector: | |
matchLabels: | |
app: nfs-web | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: nfs-web | |
spec: | |
containers: | |
- image: nginx | |
name: nfs-web | |
ports: | |
- containerPort: 80 | |
name: web | |
volumeMounts: | |
- mountPath: /usr/share/nginx/html | |
name: nfs-volume | |
volumes: | |
- name: nfs-volume | |
persistentVolumeClaim: | |
claimName: nfs-pvc | |
--- | |
apiVersion: v1 | |
kind: PersistentVolume | |
metadata: | |
name: nfs-pv | |
annotations: | |
volume.beta.kubernetes.io/storage-class: "slow" | |
spec: | |
capacity: | |
storage: 2Gi | |
accessModes: | |
- ReadWriteMany | |
persistentVolumeReclaimPolicy: Retain | |
nfs: | |
server: 10.124.119.202 | |
path: "/share" | |
readOnly: false | |
--- | |
apiVersion: v1 | |
kind: PersistentVolumeClaim | |
metadata: | |
name: nfs-pvc | |
annotations: | |
volume.beta.kubernetes.io/storage-class: "slow" | |
spec: | |
accessModes: | |
- ReadWriteMany | |
resources: | |
requests: | |
storage: 1Gi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment