Cluster information:
Kubernetes version: minikube version: v1.30.1
Cloud being used: (put bare-metal if not on a public cloud) AWS
Installation method: CLI
Host OS: Linux
Created a deployment yaml where we added 2 docker images and deployed it in EC2 using kubernetes and to expose the second container we created a service yaml and deployed the same in kubernetes. But the external IP is not generated showing as . Tried cluster ip, ingress, loadbalancer and nodeport in the type value of service yaml. still facing the issue generating the external IP. Could you please guide us to resolve this?
kubectl get service -n greengrass
NAME TYPE CLUSTER-IP EXTERNAL-IP PORT(S) AGE
flask-api-service NodePort 10.106.126.8 80:31086/TCP 3h24m
deployment.yaml
apiVersion: apps/v1
kind: Deployment
metadata:
name: greengrass-core
namespace: greengrass
spec:
replicas: 3
selector:
matchLabels:
app: greengrass-core
template:
metadata:
labels:
app: greengrass-core
spec:
containers:
- name: aws-iot-greengrass
image: docker_image_1(in ecr)
ports:
- containerPort: 8883
envFrom:
- configMapRef:
name: greengrass-env-configmap
- name: registration-api
image: docker_image_2(in ecr)
ports:
- containerPort: 8886
service.yaml
apiVersion: v1
kind: Service
metadata:
name: flask-api-service
namespace: greengrass
spec:
selector:
app: greengrass-core
ports:
- protocol: TCP
port: 80
targetPort: 8886
type: Nodeport