Solution TP 2

/images/k8s.jpeg

TP2 : Frontend

🇫🇷 Version Française

Deployment

Manifest du deployment :

 1kind: Deployment
 2apiVersion: apps/v1
 3metadata:
 4  name: front-training-app
 5spec:
 6  replicas: 2
 7  selector:
 8    matchLabels:
 9      app: front-training-app
10  template:
11    metadata:
12      labels:
13        app: front-training-app
14    spec:
15      containers:
16        - name: front-training-app
17          image: axelpereira/k8s-training-test-app-front:1.0
18          imagePullPolicy: IfNotPresent

Service

Manifest du service :

 1kind: Service
 2apiVersion: v1
 3metadata:
 4  name: front-training-app
 5spec:
 6  type: NodePort
 7  ports:
 8    - port: 80
 9      targetPort: 80
10  selector:
11    app: front-training-app
🇬🇧 English version

Deployment

Deployment manifest :

 1kind: Deployment
 2apiVersion: apps/v1
 3metadata:
 4  name: front-training-app
 5spec:
 6  replicas: 2
 7  selector:
 8    matchLabels:
 9      app: front-training-app
10  template:
11    metadata:
12      labels:
13        app: front-training-app
14    spec:
15      containers:
16        - name: front-training-app
17          image: axelpereira/k8s-training-test-app-front:1.0
18          imagePullPolicy: IfNotPresent

Service

Service manifest :

 1kind: Service
 2apiVersion: v1
 3metadata:
 4  name: front-training-app
 5spec:
 6  type: NodePort
 7  ports:
 8    - port: 80
 9      targetPort: 80
10  selector:
11    app: front-training-app

Latest Posts