-
Notifications
You must be signed in to change notification settings - Fork 271
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
cacd69e
commit 4485c5b
Showing
26 changed files
with
739 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
In Kubernetes, when you apply a YAML configuration file containing multiple objects (e.g., Deployments, Services), the objects are not deployed strictly in the order they appear in the file. Kubernetes applies the entire configuration at once, and the order of deployment is not guaranteed. | ||
|
||
However, Kubernetes handles dependencies between objects gracefully. For example, if a Deployment depends on a Service being available, Kubernetes ensures that the Service is up and running before the Pods in the Deployment start to use it. | ||
|
||
To summarize: | ||
1. **No Guaranteed Order**: The objects in the YAML file are not deployed in a strict sequence. | ||
2. **Dependency Management**: Kubernetes ensures that dependent resources are available when needed. | ||
|
||
Here is a brief outline of the objects in your YAML file: | ||
|
||
1. **emailservice** | ||
- Deployment | ||
- Service | ||
2. **checkoutservice** | ||
- Deployment | ||
- Service | ||
3. **recommendationservice** | ||
- Deployment | ||
- Service | ||
4. **frontend** | ||
- Deployment | ||
- Service | ||
- LoadBalancer Service | ||
5. **paymentservice** | ||
- Deployment | ||
- Service | ||
6. **productcatalogservice** | ||
- Deployment | ||
- Service | ||
7. **cartservice** | ||
- Deployment | ||
- Service | ||
8. **loadgenerator** | ||
- Deployment | ||
9. **currencyservice** | ||
- Deployment | ||
- Service | ||
10. **shippingservice** | ||
- Deployment | ||
- Service | ||
11. **redis-cart** | ||
- Deployment | ||
- Service | ||
12. **adservice** | ||
- Deployment | ||
- 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,41 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: adservice | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: adservice | ||
template: | ||
metadata: | ||
labels: | ||
app: adservice | ||
spec: | ||
serviceAccountName: default | ||
terminationGracePeriodSeconds: 5 | ||
containers: | ||
- name: server | ||
image: adijaiswal/adservice:latest | ||
ports: | ||
- containerPort: 9555 | ||
env: | ||
- name: PORT | ||
value: "9555" | ||
resources: | ||
requests: | ||
cpu: 200m | ||
memory: 180Mi | ||
limits: | ||
cpu: 300m | ||
memory: 300Mi | ||
readinessProbe: | ||
initialDelaySeconds: 20 | ||
periodSeconds: 15 | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:9555"] | ||
livenessProbe: | ||
initialDelaySeconds: 20 | ||
periodSeconds: 15 | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:9555"] |
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,13 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: adservice | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: adservice | ||
ports: | ||
- name: grpc | ||
port: 9555 | ||
targetPort: 9555 |
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,40 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: cartservice | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: cartservice | ||
template: | ||
metadata: | ||
labels: | ||
app: cartservice | ||
spec: | ||
serviceAccountName: default | ||
terminationGracePeriodSeconds: 5 | ||
containers: | ||
- name: server | ||
image: adijaiswal/cartservice:latest | ||
ports: | ||
- containerPort: 7070 | ||
env: | ||
- name: REDIS_ADDR | ||
value: "redis-cart:6379" | ||
resources: | ||
requests: | ||
cpu: 200m | ||
memory: 64Mi | ||
limits: | ||
cpu: 300m | ||
memory: 128Mi | ||
readinessProbe: | ||
initialDelaySeconds: 15 | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:7070", "-rpc-timeout=5s"] | ||
livenessProbe: | ||
initialDelaySeconds: 15 | ||
periodSeconds: 10 | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:7070", "-rpc-timeout=5s"] |
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,13 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: cartservice | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: cartservice | ||
ports: | ||
- name: grpc | ||
port: 7070 | ||
targetPort: 7070 |
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,48 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: checkoutservice | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: checkoutservice | ||
template: | ||
metadata: | ||
labels: | ||
app: checkoutservice | ||
spec: | ||
serviceAccountName: default | ||
containers: | ||
- name: server | ||
image: adijaiswal/checkoutservice:latest | ||
ports: | ||
- containerPort: 5050 | ||
readinessProbe: | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:5050"] | ||
livenessProbe: | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:5050"] | ||
env: | ||
- name: PORT | ||
value: "5050" | ||
- name: PRODUCT_CATALOG_SERVICE_ADDR | ||
value: "productcatalogservice:3550" | ||
- name: SHIPPING_SERVICE_ADDR | ||
value: "shippingservice:50051" | ||
- name: PAYMENT_SERVICE_ADDR | ||
value: "paymentservice:50051" | ||
- name: EMAIL_SERVICE_ADDR | ||
value: "emailservice:5000" | ||
- name: CURRENCY_SERVICE_ADDR | ||
value: "currencyservice:7000" | ||
- name: CART_SERVICE_ADDR | ||
value: "cartservice:7070" | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 64Mi | ||
limits: | ||
cpu: 200m | ||
memory: 128Mi |
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,13 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: checkoutservice | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: checkoutservice | ||
ports: | ||
- name: grpc | ||
port: 5050 | ||
targetPort: 5050 |
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,40 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: currencyservice | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: currencyservice | ||
template: | ||
metadata: | ||
labels: | ||
app: currencyservice | ||
spec: | ||
serviceAccountName: default | ||
terminationGracePeriodSeconds: 5 | ||
containers: | ||
- name: server | ||
image: adijaiswal/currencyservice:latest | ||
ports: | ||
- name: grpc | ||
containerPort: 7000 | ||
env: | ||
- name: PORT | ||
value: "7000" | ||
- name: DISABLE_PROFILER | ||
value: "1" | ||
readinessProbe: | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:7000"] | ||
livenessProbe: | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:7000"] | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 64Mi | ||
limits: | ||
cpu: 200m | ||
memory: 128Mi |
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,13 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: currencyservice | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: currencyservice | ||
ports: | ||
- name: grpc | ||
port: 7000 | ||
targetPort: 7000 |
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,53 @@ | ||
--- | ||
apiVersion: apps/v1 | ||
kind: Deployment | ||
metadata: | ||
name: emailservice | ||
spec: | ||
selector: | ||
matchLabels: | ||
app: emailservice | ||
template: | ||
metadata: | ||
labels: | ||
app: emailservice | ||
spec: | ||
serviceAccountName: default | ||
terminationGracePeriodSeconds: 5 | ||
securityContext: | ||
fsGroup: 1000 | ||
runAsGroup: 1000 | ||
runAsNonRoot: true | ||
runAsUser: 1000 | ||
containers: | ||
- name: server | ||
securityContext: | ||
allowPrivilegeEscalation: false | ||
capabilities: | ||
drop: | ||
- ALL | ||
privileged: false | ||
readOnlyRootFilesystem: true | ||
image: adijaiswal/emailservice:latest | ||
ports: | ||
- containerPort: 8080 | ||
env: | ||
- name: PORT | ||
value: "8080" | ||
- name: DISABLE_PROFILER | ||
value: "1" | ||
readinessProbe: | ||
periodSeconds: 5 | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:8080"] | ||
livenessProbe: | ||
periodSeconds: 5 | ||
exec: | ||
command: ["/bin/grpc_health_probe", "-addr=:8080"] | ||
resources: | ||
requests: | ||
cpu: 100m | ||
memory: 64Mi | ||
limits: | ||
cpu: 200m | ||
memory: 128Mi |
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,13 @@ | ||
--- | ||
apiVersion: v1 | ||
kind: Service | ||
metadata: | ||
name: emailservice | ||
spec: | ||
type: ClusterIP | ||
selector: | ||
app: emailservice | ||
ports: | ||
- name: grpc | ||
port: 5000 | ||
targetPort: 8080 |
Oops, something went wrong.