Created
November 7, 2023 10:23
-
-
Save bsingr/6eda8574d6f42a205599fdcc3217a751 to your computer and use it in GitHub Desktop.
k8s nginx 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
kind: Namespace | |
apiVersion: v1 | |
metadata: | |
name: demo | |
labels: | |
name: demo | |
--- | |
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx | |
namespace: demo | |
labels: | |
app: nginx | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: nginx | |
template: | |
metadata: | |
namespace: demo | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx:1.14.2 | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: demo | |
namespace: demo | |
spec: | |
selector: | |
app.kubernetes.io/name: nginx | |
ports: | |
- name: http | |
protocol: TCP | |
port: 80 | |
targetPort: 80 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment