Created
March 18, 2022 13:11
-
-
Save markround/d31446d5f6a3e82059bfd6ee301c5b0e to your computer and use it in GitHub Desktop.
nodeport
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
--- | |
apiVersion: apps/v1 # for versions before 1.9.0 use apps/v1beta2 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
namespace: default | |
spec: | |
selector: | |
matchLabels: | |
app: nginx | |
replicas: 1 | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
image: nginx | |
ports: | |
- containerPort: 80 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: nginx | |
namespace: default | |
labels: | |
name: nginx | |
spec: | |
type: NodePort | |
ports: | |
- port: 80 | |
name: http | |
protocol: TCP | |
selector: | |
app: nginx |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment