-
-
Save krotkiewicz/e61b21e5aa84e7b8c1c326586caac4a7 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: v1 | |
kind: Service | |
metadata: | |
name: nginx | |
labels: | |
run: nginx | |
spec: | |
type: NodePort | |
ports: | |
- name: http | |
port: 80 | |
nodePort: 30073 | |
selector: | |
run: nginx |
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
root@node:~$ kube-proxy --master=http://localhost:8080 &> /tmp/proxy.log & | |
root@node:~$ kubectl create -f nginx-svc.yaml | |
service "nginx" created | |
root@node:~$ kubectl get svc | |
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE | |
kubernetes 10.0.0.1 <none> 443/TCP 2h | |
nginx 10.0.167.201 <nodes> 80:30073/TCP 7s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment