Deployment.yml
apiVersion: apps/v1
kind: Deployment
metadata:
name: wc-deployment
spec:
replicas: 1
selector:
matchLabels:
app: wc
template:
metadata:
labels:
app: wc
spec:
containers:
- name: wc
image: myrepo33/wc:latest
ports:
- containerPort: 4499
Service.yml
apiVersion: v1
kind: Service
metadata:
name: wc-service
spec:
selector:
app: wc
ports:
- protocol: TCP
port: 80
targetPort: 4499
nodePort: 30001
type: NodePort
Task
● The app must be exposed as a Kubernetes service for
accessibility.
●Ensure that the application supports secure TLS
communication.
Now to access app on internet, I tried nodePort but not working. I am working in Minikube.
As you can see in service file i exposed nodePort 30001 so i opened port from Security Group as well still not working. Locally by using curl it is working.
And the second task is app should support TLS communication which i don’t know ho to do that.
Patil is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.