Skip to content

Commit

Permalink
Fix k8s component sample
Browse files Browse the repository at this point in the history
  • Loading branch information
sleshchenko committed May 25, 2021
1 parent e962f26 commit 1c39164
Showing 1 changed file with 29 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,58 +43,55 @@ The following is an example of the `postgres.yaml` file.
apiVersion: v1
kind: List
items:
-
apiVersion: v1
- apiVersion: v1
kind: Deployment
metadata:
name: postgres
labels:
app: postgres
name: postgres
labels:
app: postgres
spec:
template:
template:
metadata:
name: postgres
app:
name: postgres
app:
name: postgres
spec:
containers:
containers:
- image: postgres
name: postgres
ports:
- name: postgres
containerPort: 5432
volumeMounts:
- name: pg-storage
mountPath: /var/lib/postgresql/data
volumes:
- name: postgres
containerPort: 5432
volumeMounts:
- name: pg-storage
mountPath: /var/lib/postgresql/data
volumes:
- name: pg-storage
persistentVolumeClaim:
claimName: pg-storage
-
apiVersion: v1
claimName: pg-storage
- apiVersion: v1
kind: Service
metadata:
name: postgres
labels:
app: postgres
name: postgres
labels:
app: postgres
name: postgres
spec:
ports:
- port: 5432
targetPort: 5432
-
apiVersion: v1
ports:
- port: 5432
targetPort: 5432
- apiVersion: v1
kind: PersistentVolumeClaim
metadata:
name: pg-storage
name: pg-storage
labels:
app: postgres
spec:
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
accessModes:
- ReadWriteOnce
resources:
requests:
storage: 1Gi
----

For a basic example of a devfile with an associated Kubernetes or OpenShift list, see link:https://github.com/redhat-developer/devfile/tree/master/samples/web-nodejs-with-db-sample[web-nodejs-with-db-sample] on redhat-developer GitHub.

0 comments on commit 1c39164

Please sign in to comment.