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

Save deployment files #3

Merged
merged 1 commit into from
Dec 6, 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
35 changes: 35 additions & 0 deletions dockercfg.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
{
// If your cluster does not run on GKE or it runs on GKE and pulls images from other private registries, add the following:
"auths": {
"gcr.io": {
"auth": "BASE64-ENCODED-AUTH-DETAILS"
}
// Add other registries as necessary
},

// If your cluster runs on GKE and you are using GCR, add the following:
"credHelpers": {
"us.gcr.io": "gcloud",
"asia.gcr.io": "gcloud",
"marketplace.gcr.io": "gcloud",
"gcr.io": "gcloud",
"eu.gcr.io": "gcloud",
"staging-k8s.gcr.io": "gcloud"
}

// If your cluster runs on EKS and you are using ECR, add the following:
{
"credsStore": "ecr-login"
}

With Docker 1.13.0 or greater, you can configure Docker to use different credential helpers for different registries.
To use this credential helper for a specific ECR registry, create a credHelpers section with the URI of your ECR registry:

{
"credHelpers": {
"public.ecr.aws": "ecr-login",
"<aws_account_id>.dkr.ecr.<region>.amazonaws.com": "ecr-login"
}
}

}
46 changes: 46 additions & 0 deletions goof-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
---
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: colinsimningsnyk/nodejs-goof
name: goof
ports:
- containerPort: 3001
- containerPort: 9229
resources: {}
env:
- name: "DOCKER"
value: "1"
restartPolicy: Alway
36 changes: 36 additions & 0 deletions goof-mongo-deployment.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
---
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