1 Answer
- Newest
- Most votes
- Most comments
0
Hello Joash, If your EKS cluster is currently not setup, here are three good resources to start with:
- The AWS getting started guide using Fargate
- There is also an EKS workshop which explains how to create the cluster using eksctl
- If using Terraform, you can find the same kind of guide here
Regarding Kubernetes manifests, I would go for two deployment objects (one for angular and one for spring boot), services for each and Ingress with an Ingress Controller you have to setup (e.g: Nginx ingress controller or AWS Load balancer controller). Some resources for the ingress controller:
An example of what your angular deployment could look like (without using Helm or Kustomize)
apiVersion: apps/v1
kind: Deployment
metadata:
name: angular-deployment
spec:
selector:
matchLabels:
app: app.kubernetes.io/name: frontend
template:
metadata:
labels:
app.kubernetes.io/name: frontend
spec:
containers:
- name: myapp
image: YOUR_ECR_IMAGE_URI
resources:
limits:
memory: "128Mi"
cpu: "500m"
ports:
- containerPort: 80
---
apiVersion: v1
kind: Service
metadata:
name: angular-svc
spec:
selector:
app.kubernetes.io/name: frontend
ports:
- port: 80
targetPort: 80
---
apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
name: ingress
labels:
name: ingress
spec:
rules:
- host: example.com
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: angular-svc
port:
number: 80
- host: api.example.com
http:
paths:
- pathType: Prefix
path: "/"
backend:
service:
name: spring-svc
port:
number: 8000
Let me know if you have any questions
answered a year ago
Relevant content
- asked 2 years ago
- asked a year ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 2 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago
Thank you. when I create a cluster and fargate class via eksctl, my Kube-system namespace, coredns pods work whereas when I use the console to create them, the coredsn pods don't work. Do you know how to set up security groups to allow communication? I look up the ones set by eksctl and got stuck