Last active
June 1, 2017 20:45
-
-
Save harsh-px/321bbe5ebe3f0f2ca1bc433aef86c9da to your computer and use it in GitHub Desktop.
Portworx + k8s + nginx
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
##### Portworx storage class | |
kind: StorageClass | |
apiVersion: storage.k8s.io/v1beta1 | |
metadata: | |
name: portworx-io-priority-high | |
provisioner: kubernetes.io/portworx-volume | |
parameters: | |
repl: "1" | |
snap_interval: "70" | |
io_priority: "high" | |
shared: "true" | |
--- | |
##### Portworx persistent volume claim | |
kind: PersistentVolumeClaim | |
apiVersion: v1 | |
metadata: | |
name: pvcsc001 | |
annotations: | |
volume.beta.kubernetes.io/storage-class: portworx-io-priority-high | |
spec: | |
accessModes: | |
- ReadWriteOnce | |
resources: | |
requests: | |
storage: 1Gi | |
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: nginx-service | |
spec: | |
type: NodePort | |
ports: | |
- port: 80 | |
nodePort: 30080 | |
name: http | |
- port: 443 | |
nodePort: 30443 | |
name: https | |
--- | |
apiVersion: v1 | |
kind: ReplicationController | |
metadata: | |
name: nginx | |
spec: | |
replicas: 2 | |
selector: | |
app: nginx | |
template: | |
metadata: | |
name: nginx | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx | |
ports: | |
- containerPort: 80 | |
volumeMounts: | |
- name: shared-data | |
mountPath: /usr/share/nginx/html | |
volumes: | |
- name: shared-data | |
persistentVolumeClaim: | |
claimName: pvcsc001 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment