Changes between Version 5 and Version 6 of minikubedeployment2023


Ignore:
Timestamp:
Nov 28, 2023, 4:21:36 PM (12 months ago)
Author:
deepthi
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • minikubedeployment2023

    v5 v6  
    169169==== Part 2 ====
    170170Create a file simple-pod.yaml
    171 
     171{{{
    172172apiVersion: v1
    173173kind: Pod
     
    180180    ports:
    181181    - containerPort: 80
     182}}}
    182183
    183184To create the Pod shown above, run the following command:
     
    195196Save the following YAML to a file named webapp-deployment.yaml:
    196197
     198{{{
    197199apiVersion: apps/v1
    198200kind: Deployment
     
    216218        ports:
    217219        - containerPort: 80
     220}}}
    218221
    2192222. Create a Service Manifest:
     
    221224Save the following YAML to a file named webapp-service.yaml:
    222225
     226{{{
    223227apiVersion: v1
    224228kind: Service
     
    234238      nodePort: 30080
    235239  type: NodePort
     240}}}
    236241
    2372423. Deploy the Application:
     
    278283
    279284MySQL needs persistent storage to store its data. Save the following YAML to a file named mysql-pvc.yaml:
     285
     286{{{
    280287apiVersion: v1
    281288kind: PersistentVolumeClaim
     
    288295    requests:
    289296      storage: 1Gi
     297}}}
    290298
    291299Apply the PVC:
     
    296304Save the following YAML to a file named mysql-deployment.yaml:
    297305
     306{{{
    298307apiVersion: apps/v1
    299308kind: Deployment
     
    327336        persistentVolumeClaim:
    328337          claimName: mysql-pvc
     338}}}
    329339
    330340Apply the Deployment:
     
    336346This will allow WordPress to communicate with MySQL. Save the following YAML to a file named mysql-service.yaml:
    337347
     348{{{
    338349apiVersion: v1
    339350kind: Service
     
    347358      port: 3306
    348359      targetPort: 3306
     360}}}
    349361
    350362Apply the Service:
     
    354366Save the following YAML to a file named wordpress-deployment.yaml:
    355367
     368{{{
    356369apiVersion: apps/v1
    357370kind: Deployment
     
    380393        ports:
    381394        - containerPort: 80
     395}}}
    382396
    383397Apply the Deployment:
     
    388402This will expose WordPress to external traffic. Save the following YAML to a file named wordpress-service.yaml:
    389403
     404{{{
    390405apiVersion: v1
    391406kind: Service
     
    400415      targetPort: 80
    401416  type: NodePort
     417}}}
    402418
    403419Apply the Service: