Followers

Capston :-Kubernetes Helm implenentation

   docker pull ramansharma95/webapp  docker pull ramansharma95/mysql docker image tag ramansharma95/webapp user/webapp docker image tag rama...

 

 docker pull ramansharma95/webapp

 docker pull ramansharma95/mysql

docker image tag ramansharma95/webapp user/webapp

docker image tag ramansharma95/mysql user/mysql

 helm create capstonepackage

cd  capstonepackage/templates

rm * -ifr

Create a file deployweb.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: web-deploy
  labels:
    app: web-app
spec:
  replicas: 3
  template:
    metadata:
      labels:
        app: web-app
    spec:
      containers:
      - name: web-container
        image: ramansharma95/webapp
        ports:
        - containerPort: 80
  selector:
    matchLabels:
      app: web-app


Create a file deploydb.yaml

apiVersion: apps/v1
kind: Deployment
metadata:
  name: db-deploy
  labels:
    app: db-app
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: db-app
    spec:
      containers:
      - name: db-container
        image: ramansharma95/mysql
        ports:
        - containerPort: 3306
  selector:
    matchLabels:
      app: db-app

WebService serviceweb.yml

apiVersion: v1
kind: Service
metadata:
  name: web-service
  labels:
    app: web-app
spec:
  selector:
    app: web-app
  type: NodePort
  ports:
  - nodePort: 31111
    port: 80
    targetPort: 80

Service for db servicedb.yml

apiVersion: v1
kind: Service
metadata:
  name: db
  labels:
    app: db-app
spec:
  selector:
    app: db-app
  type: ClusterIP
  ports:
  - port: 3306
    targetPort: 3306

cd ../../

Goto db pod (the name of the pod is different in your case so pickup that db pod)

kubectl get pods

kubectl exec -it db-deploy-74ffb848cf-hwmgf -- bash

mysql -uroot -pwhizlabs

create database company;

use company;

create table employee(name varchar(30), mobile varchar(20));

select * from employee;












COMMENTS

Name

Ansible,6,AWS,1,Azure DevOps,1,Containerization with docker,2,DevOps,2,Docker Quiz,1,Docker Swarm,1,DockerCompose,1,ELK,2,git,2,git quiz,1,Git Worksheet,1,ITIL,1,ITSM,1,Jira,3,Kubernetes,1,Kubernetes Quiz,5,SAST DAST Security Testing,1,SDLC Quiz,5,SonarQube,3,Splunk,2,vagrant kubernetes,1,Windows,1,YAML Basics,1,
ltr
item
DevOpsWorld: Capston :-Kubernetes Helm implenentation
Capston :-Kubernetes Helm implenentation
DevOpsWorld
https://www.devopsworld.co.in/2022/03/capston-kubernetes-helm-implenentation.html
https://www.devopsworld.co.in/
https://www.devopsworld.co.in/
https://www.devopsworld.co.in/2022/03/capston-kubernetes-helm-implenentation.html
true
5997357714110665304
UTF-8
Loaded All Posts Not found any posts VIEW ALL Readmore Reply Cancel reply Delete By Home PAGES POSTS View All RECOMMENDED FOR YOU LABEL ARCHIVE SEARCH ALL POSTS Not found any post match with your request Back Home Sunday Monday Tuesday Wednesday Thursday Friday Saturday Sun Mon Tue Wed Thu Fri Sat January February March April May June July August September October November December Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec just now 1 minute ago $$1$$ minutes ago 1 hour ago $$1$$ hours ago Yesterday $$1$$ days ago $$1$$ weeks ago more than 5 weeks ago Followers Follow THIS PREMIUM CONTENT IS LOCKED STEP 1: Share to a social network STEP 2: Click the link on your social network Copy All Code Select All Code All codes were copied to your clipboard Can not copy the codes / texts, please press [CTRL]+[C] (or CMD+C with Mac) to copy Table of Content