Last active
September 10, 2021 11:01
-
-
Save nimboya/4b1d2cecfe7a0e9d664325f74fcd70c7 to your computer and use it in GitHub Desktop.
MyCloudSeries DevOps Training Kubernetes Demo
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: myapp | |
spec: | |
selector: | |
matchLabels: | |
app: myappms | |
replicas: 3 | |
template: | |
metadata: | |
labels: | |
app: myappms | |
spec: | |
containers: | |
- name: httpdpod | |
image: httpd:2.4.48 | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: myapp-svc | |
spec: | |
selector: | |
app: myappms | |
ports: | |
- name: http | |
protocol: TCP | |
port: 80 | |
targetPort: 80 | |
type: NodePort |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: wordpress | |
spec: | |
selector: | |
matchLabels: | |
app: wordpress | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: wordpress | |
spec: | |
containers: | |
- name: wordpresspod | |
image: 'myrepo:test' | |
ports: | |
- containerPort: 80 | |
env: | |
- name: WORDPRESS_DB_HOST | |
value: mysql | |
- name: WORDPRES_DB_PASSWORD | |
valueFrom: | |
secretKeyRef: | |
name: mysql-pass | |
key: password | |
imagePullSecrets: | |
- name: regcred |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Pod | |
metadata: | |
name: mycloudseries | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:1.14.2 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: myapp-svc | |
spec: | |
selector: | |
app: myappms | |
ports: | |
- name: http | |
protocol: TCP | |
port: 80 | |
targetPort: 80 | |
- name: https | |
protocol: TCP | |
port: 443 | |
targetPort: 80 | |
type: NodePort |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment