root@eng-app-node:~# more spider.yaml
apiVersion: v1
kind: Pod
metadata:
name: spider
namespace: eng
labels:
app: spider
tier: frontend
environment: training
spec:
containers:
- name: tomcat
image: kulbhushanmayer/tomcat:10.1.5
ports:
- containerPort: 8080
name: tomcat
- name: vote
image: kulbhushanmayer/vote:1.1
ports:
- containerPort: 80
name: vote
root@eng-app-node:~# more service.yaml
apiVersion: v1
kind: Service
metadata:
name: spider-svc
namespace: eng
labels:
app: spider
spec:
type: ClusterIP
ports:
- port: 80
targetPort: tomcat
protocol: TCP
name: tomcat
- port: 81
targetPort: vote
protocol: TCP
name: vote
selector:
app: spider
tier: frontend
environment: training
root@eng-app-node:~#
No comments:
Post a Comment