Last active
May 28, 2020 04:51
-
-
Save tomoyk/a717fb613d5ca1aaf6ed3c89757eea08 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
apiVersion: apps/v1 | |
kind: Deployment | |
metadata: | |
name: nginx-deployment | |
labels: | |
app: nginx | |
spec: | |
replicas: 3 | |
selector: | |
matchLabels: | |
app: nginx | |
template: | |
metadata: | |
labels: | |
app: nginx | |
spec: | |
containers: | |
- name: nginx | |
# image: nginx:1.7.9 | |
image: adongy/hostname-docker | |
ports: | |
- containerPort: 3000 | |
--- | |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: my-www | |
spec: | |
type: clusterIP | |
selector: | |
app: nginx | |
ports: | |
- name: http | |
protocol: TCP | |
port: 80 | |
targetPort: 3000 | |
type: ClusterIP | |
externalIPs: | |
- 192.168.100.95 |
Author
tomoyk
commented
Sep 12, 2019
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment