본문 바로가기
Linux/Kubernetes

Kubernetes Apache Web Test

by Miners1205 2023. 8. 10.
반응형

$ vim nginx-deployment.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: nginx
  labels:
    app: nginx
spec:
  replicas: 1
  selector:
    matchLabels:
      app: nginx
  template:
    metadata:
      labels:
        app: nginx
    spec:
      containers:
      - name: nginx
        image: nginx
        ports:
        - containerPort: 80

 

 

$ vim nginx-service.yaml

apiVersion: v1
kind: Service
metadata:
name: ngnix-service
spec:
selector:
app: nginx
type: NodePort
ports:
- protocol: TCP
port: 80
targetPort: 80
반응형

'Linux > Kubernetes' 카테고리의 다른 글

Kubernetes install in CentOS 7.8  (0) 2023.08.10