Last active
August 15, 2023 08:47
-
-
Save nimboya/09c38c942ffa92223b7710f201d2d6b1 to your computer and use it in GitHub Desktop.
Kubernetes Deployment File
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: nginxdemo | |
replicas: 3 | |
template: | |
metadata: | |
labels: | |
app: nginxdemo | |
spec: | |
containers: | |
- name: nginxdemo | |
image: nginxdemos/hello | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginxdemo-svc | |
spec: | |
selector: | |
app: nginxdemo | |
ports: | |
- name: http | |
protocol: TCP | |
port: 80 | |
targetPort: 80 | |
type: LoadBalancer |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment