新增learn-kubernetes(https://github.com/yyong-brs/learn-kubernetes)相关文件
This commit is contained in:
@@ -0,0 +1,16 @@
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
metadata:
|
||||
name: petshop-connection-string-secret
|
||||
labels:
|
||||
kiamol: ch18
|
||||
type: Opaque
|
||||
stringData:
|
||||
connectionStrings.config: |-
|
||||
<connectionStrings>
|
||||
<add name="SQLProfileConnString" connectionString="server=petshop-db;database=MSPetShop4Profile;user id=sa;password=DockerCon!!!;min pool size=4;max pool size=4;" providerName="System.Data.SqlClient"/>
|
||||
<add name="SQLMembershipConnString" connectionString="server=petshop-db;database=MSPetShop4Services;user id=sa;password=DockerCon!!!;min pool size=4;max pool size=4;" providerName="System.Data.SqlClient"/>
|
||||
<add name="SQLConnString1" connectionString="server=petshop-db;database=MSPetShop4;user id=sa;password=DockerCon!!!;min pool size=4;max pool size=4;" providerName="System.Data.SqlClient"/>
|
||||
<add name="SQLConnString2" connectionString="server=petshop-db;database=MSPetShop4;user id=sa;password=DockerCon!!!;max pool size=4;min pool size=4;" providerName="System.Data.SqlClient"/>
|
||||
<add name="SQLConnString3" connectionString="server=petshop-db;database=MSPetShop4Orders;user id=sa;password=DockerCon!!!;min pool size=4;max pool size=4;" providerName="System.Data.SqlClient"/>
|
||||
</connectionStrings>
|
||||
@@ -0,0 +1,40 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: petshop-db
|
||||
labels:
|
||||
kiamol: ch18
|
||||
spec:
|
||||
type: ClusterIP
|
||||
ports:
|
||||
- port: 1433
|
||||
targetPort: mssql
|
||||
selector:
|
||||
app: petshop
|
||||
component: db
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: petshop-db
|
||||
labels:
|
||||
kiamol: ch18
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: petshop
|
||||
component: db
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: petshop
|
||||
component: db
|
||||
spec:
|
||||
containers:
|
||||
- image: sixeyed/petshop-db:1809
|
||||
name: db
|
||||
ports:
|
||||
- containerPort: 1433
|
||||
name: mssql
|
||||
nodeSelector:
|
||||
kubernetes.io/os: windows
|
||||
@@ -0,0 +1,49 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: petshop-web
|
||||
labels:
|
||||
kiamol: ch18
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
nodePort: 30002
|
||||
selector:
|
||||
app: petshop
|
||||
component: web
|
||||
type: NodePort
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: petshop-web
|
||||
labels:
|
||||
kiamol: ch18
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: petshop
|
||||
component: web
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: petshop
|
||||
component: web
|
||||
spec:
|
||||
containers:
|
||||
- image: sixeyed/petshop-web:1809
|
||||
name: petshop-web
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: connection-string
|
||||
mountPath: "/petshop-web/config"
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: connection-string
|
||||
secret:
|
||||
secretName: petshop-connection-string-secret
|
||||
nodeSelector:
|
||||
kubernetes.io/os: windows
|
||||
@@ -0,0 +1,49 @@
|
||||
apiVersion: v1
|
||||
kind: Service
|
||||
metadata:
|
||||
name: petshop-webservice
|
||||
labels:
|
||||
kiamol: ch18
|
||||
spec:
|
||||
ports:
|
||||
- port: 80
|
||||
targetPort: http
|
||||
nodePort: 30003
|
||||
selector:
|
||||
app: petshop
|
||||
component: webservice
|
||||
type: NodePort
|
||||
---
|
||||
apiVersion: apps/v1
|
||||
kind: Deployment
|
||||
metadata:
|
||||
name: petshop-webservice
|
||||
labels:
|
||||
kiamol: ch18
|
||||
spec:
|
||||
selector:
|
||||
matchLabels:
|
||||
app: petshop
|
||||
component: webservice
|
||||
template:
|
||||
metadata:
|
||||
labels:
|
||||
app: petshop
|
||||
component: webservice
|
||||
spec:
|
||||
containers:
|
||||
- image: sixeyed/petshop-webservice:1809
|
||||
name: petshop-webservice
|
||||
ports:
|
||||
- containerPort: 80
|
||||
name: http
|
||||
volumeMounts:
|
||||
- name: connection-string
|
||||
mountPath: "/petshop-webservice/config"
|
||||
readOnly: true
|
||||
volumes:
|
||||
- name: connection-string
|
||||
secret:
|
||||
secretName: petshop-connection-string-secret
|
||||
nodeSelector:
|
||||
kubernetes.io/os: windows
|
||||
Reference in New Issue
Block a user