Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deployment file creation #1

Merged
merged 2 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
# FROM node:6-stretch
FROM node:14.1.0
FROM node:8

RUN mkdir /usr/src/goof
RUN mkdir /tmp/extracted_files
Expand Down
47 changes: 47 additions & 0 deletions goof-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
apiVersion: v1
kind: Service
metadata:
name: goof
spec:
ports:
- name: "3001"
port: 3001
targetPort: 3001
nodePort: 30001 #port exposed on localhost
- name: "9229"
port: 9229
targetPort: 9229
nodePort: 30002
selector:
app: goof
type: LoadBalancer


---
apiVersion: apps/v1
kind: Deployment
metadata:
name: goof
spec:
replicas: 1
selector:
matchLabels:
app: goof
template:
metadata:
labels:
app: goof
spec:
containers:
- image: oliversnyk/docker-goof
name: goof
ports:
- containerPort: 3001
- containerPort: 9229
resources: {}
env:
- name: "DOCKER"
value: "1"
restartPolicy: Always

37 changes: 37 additions & 0 deletions goof-mongo-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
---
apiVersion: v1
kind: Service
metadata:
name: goof-mongo
spec:
ports:
- name: "27017"
port: 27017
targetPort: 27017
selector:
app: goof-mongo


---
apiVersion: apps/v1
kind: Deployment
metadata:
name: goof-mongo
spec:
replicas: 1
selector:
matchLabels:
app: goof-mongo
template:
metadata:
labels:
app: goof-mongo
spec:
containers:
- image: mongo
name: goof-mongo
ports:
- containerPort: 27017
resources: {}
restartPolicy: Always

11 changes: 11 additions & 0 deletions namespace-test01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"apiVersion": "v1",
"kind": "Namespace",
"metadata": {
"name": "test01",
"labels": {
"name": "development"
}
}
}

Loading