Skip to content

Instantly share code, notes, and snippets.

@sebgoa
Created September 14, 2017 22:38
Show Gist options
  • Select an option

  • Save sebgoa/931c922bf5f1efdb88b9ae5dcee0c877 to your computer and use it in GitHub Desktop.

Select an option

Save sebgoa/931c922bf5f1efdb88b9ae5dcee0c877 to your computer and use it in GitHub Desktop.

Revisions

  1. sebgoa created this gist Sep 14, 2017.
    111 changes: 111 additions & 0 deletions wp.yaml
    Original file line number Diff line number Diff line change
    @@ -0,0 +1,111 @@
    apiVersion: v1
    kind: Namespace
    metadata:
    name: linux
    ---
    apiVersion: v1
    kind: ResourceQuota
    metadata:
    name: quota
    namespace: linux
    spec:
    hard:
    pods: "2"
    ---
    apiVersion: v1
    kind: Service
    metadata:
    creationTimestamp: null
    labels:
    run: mysql
    name: mysql
    namespace: linux
    spec:
    ports:
    - port: 3306
    protocol: TCP
    targetPort: 3306
    selector:
    run: mysql
    type: NodePort
    ---
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
    creationTimestamp: null
    labels:
    run: mysql
    name: mysql
    namespace: linux
    spec:
    replicas: 1
    selector:
    matchLabels:
    run: mysql
    strategy: {}
    template:
    metadata:
    creationTimestamp: null
    labels:
    run: mysql
    spec:
    containers:
    - env:
    - name: MYSQL_ROOT_PASSWORD
    valueFrom:
    secretKeyRef:
    name: mysql
    key: password
    image: mysql:5.5
    name: mysql
    resources: {}
    ---
    apiVersion: v1
    kind: Service
    metadata:
    creationTimestamp: null
    labels:
    run: wordpress
    name: wordpress
    namespace: linux
    spec:
    ports:
    - port: 80
    protocol: TCP
    targetPort: 80
    selector:
    run: wordpress
    type: NodePort
    ---
    apiVersion: extensions/v1beta1
    kind: Deployment
    metadata:
    creationTimestamp: null
    labels:
    run: wordpress
    name: wordpress
    namespace: linux
    spec:
    replicas: 1
    selector:
    matchLabels:
    run: wordpress
    strategy: {}
    template:
    metadata:
    creationTimestamp: null
    labels:
    run: wordpress
    spec:
    containers:
    - env:
    - name: WORDPRESS_DB_HOST
    value: mysql
    - name: WORDPRESS_DB_PASSWORD
    valueFrom:
    secretKeyRef:
    name: mysql
    key: password
    image: wordpress
    name: wordpress
    resources: {}