-
-
Notifications
You must be signed in to change notification settings - Fork 670
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update README.md Update README.md docs: Added YAML config for k8s Update README.md Update README.md docs: updated new commands
- Loading branch information
1 parent
57ae0f0
commit 4e64830
Showing
15 changed files
with
402 additions
and
99 deletions.
There are no files selected for viewing
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
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: kubernetes-ingress | ||
namespace: kubernetes-dashboard | ||
spec: | ||
rules: | ||
- host: example.com # This is the domain name that you want to use for your website | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: "/" | ||
backend: | ||
service: | ||
name: kubernetes-dashboard # This is the name of the service | ||
port: | ||
number: 80 # This is the port of the service | ||
# Have different paths for different services | ||
- pathType: Prefix | ||
path: "/app" | ||
backend: | ||
service: | ||
name: app-service | ||
port: | ||
number: 3000 | ||
# Multiple most by creating subdomains | ||
- host: blog.example.com | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: "/" | ||
backend: | ||
service: | ||
name: blog-service | ||
port: | ||
number: 8080 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
apiVersion: networking.k8s.io/v1 | ||
kind: Ingress | ||
metadata: | ||
name: myingress | ||
labels: | ||
name: myingress | ||
spec: | ||
tls: | ||
- hosts: | ||
- example.com | ||
secretName: mysecret # This is the name of the secret that you created | ||
rules: | ||
- host: example.com | ||
http: | ||
paths: | ||
- pathType: Prefix | ||
path: "/" | ||
backend: | ||
service: | ||
name: <Service> | ||
port: | ||
number: 8080 |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
apiVersion: v1 | ||
kind: ConfigMap | ||
metadata: | ||
name: mongodb-configmap | ||
data: | ||
database_url: mongodb-service |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: mongo-deployment | ||
labels: | ||
app: mongodb | ||
spec: | ||
replicas: 1 | ||
selector: | ||
matchLabels: | ||
app: mongodb | ||
template: | ||
metadata: | ||
labels: | ||
app: mongodb | ||
spec: | ||
containers: | ||
- name: mongodb | ||
image: mongo | ||
ports: | ||
- containerPort: 27017 | ||
env: | ||
- name: MONGO_INITDB_ROOT_USERNAME | ||
valueFrom: | ||
secretKeyRef: | ||
name: mongodb-secrets | ||
key: mongo-root-username | ||
- name: MONGO_INITDB_ROOT_PASSWORD | ||
valueFrom: | ||
secretKeyRef: | ||
name: mongodb-secrets | ||
key: mongo-root-password |
Oops, something went wrong.