Created
September 18, 2020 19:41
-
-
Save gowatana/d52320cae4e4a4bf3372fbdbccb01151 to your computer and use it in GitHub Desktop.
This file contains 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
--- | |
kind: Service | |
apiVersion: v1 | |
metadata: | |
name: web-svc | |
spec: | |
type: LoadBalancer | |
ports: | |
- port: 80 | |
protocol: TCP | |
targetPort: 80 | |
selector: | |
app: demo-httpd | |
--- | |
kind: Deployment | |
apiVersion: apps/v1 | |
metadata: | |
name: demo-httpd | |
labels: | |
app: web | |
spec: | |
replicas: 2 | |
selector: | |
matchLabels: | |
app: demo-httpd | |
template: | |
metadata: | |
labels: | |
app: demo-httpd | |
spec: | |
containers: | |
- name: httpd | |
image: gowatana/centos7:httpd | |
ports: | |
- containerPort: 80 | |
protocol: TCP | |
affinity: | |
podAntiAffinity: | |
requiredDuringSchedulingIgnoredDuringExecution: | |
- labelSelector: | |
matchExpressions: | |
- key: app | |
operator: In | |
values: | |
- demo-httpd | |
topologyKey: "kubernetes.io/hostname" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
下記の投稿むけ。
https://vm.gowatana.jp/entry/2020/11/24/010119