Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qg-dockerfiles
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qg-dockerfiles
Commits
a3191350
Commit
a3191350
authored
Aug 16, 2017
by
daidekun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
init
parent
76195719
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
78 additions
and
0 deletions
+78
-0
mysql-deployment.yaml
mysql/mysql-deployment.yaml
+62
-0
redpacket-deployment.yml
redpacket/redpacket-deployment.yml
+16
-0
No files found.
mysql/mysql-deployment.yaml
0 → 100644
View file @
a3191350
apiVersion
:
v1
kind
:
Service
metadata
:
name
:
redpacket-mysql
labels
:
app
:
redpacket
spec
:
ports
:
-
port
:
3306
selector
:
app
:
redpacket
tier
:
mysql
clusterIP
:
None
---
apiVersion
:
v1
kind
:
PersistentVolumeClaim
metadata
:
name
:
mysql-pv-claim
# annotations:
# volume.beta.kubernetes.io/storage-class: qingcloud-storageclass
labels
:
app
:
redpacket
spec
:
accessModes
:
-
ReadWriteOnce
resources
:
requests
:
storage
:
20Gi
---
apiVersion
:
extensions/v1beta1
kind
:
Deployment
metadata
:
name
:
redpacket-mysql
labels
:
app
:
redpacket
spec
:
strategy
:
type
:
Recreate
template
:
metadata
:
labels
:
app
:
redpacket
tier
:
mysql
spec
:
containers
:
-
image
:
dockerhub.qingcloud.com/mysql:5.6
name
:
mysql
env
:
# $ kubectl create secret generic mysql-pass --from-file=password.txt
# make sure password.txt does not have a trailing newline
-
name
:
MYSQL_ROOT_PASSWORD
value
:
Quantgroup2017
ports
:
-
containerPort
:
3306
name
:
mysql
volumeMounts
:
-
name
:
mysql-persistent-storage
mountPath
:
/var/lib/mysql
volumes
:
-
name
:
mysql-persistent-storage
persistentVolumeClaim
:
claimName
:
mysql-pv-claim
\ No newline at end of file
redpacket/redpacket-deployment.yml
0 → 100644
View file @
a3191350
apiVersion
:
extensions/v1beta1
kind
:
Deployment
metadata
:
name
:
redpacket-server-deployment
spec
:
replicas
:
1
# tells deployment to run 2 pods matching the template
template
:
# create pods using pod definition in this template
metadata
:
labels
:
app
:
redpacket
spec
:
containers
:
-
name
:
redpacket-server
image
:
192.168.4.36:5000/redpacket/redpacket
ports
:
-
containerPort
:
8080
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment