mirror of
https://github.com/k3s-io/kubernetes.git
synced 2025-08-07 11:13:48 +00:00
commit
45b3ba17e3
@ -375,7 +375,7 @@ $ kubectl exec curlpod -- curl https://nginxsvc --cacert /etc/nginx/ssl/nginx.cr
|
|||||||
For some parts of your applications you may want to expose a Service onto an external IP address. Kubernetes supports two ways of doing this: NodePorts and LoadBalancers. The Service created in the last section already used `NodePort`, so your nginx https replica is ready to serve traffic on the internet if your node has a public IP.
|
For some parts of your applications you may want to expose a Service onto an external IP address. Kubernetes supports two ways of doing this: NodePorts and LoadBalancers. The Service created in the last section already used `NodePort`, so your nginx https replica is ready to serve traffic on the internet if your node has a public IP.
|
||||||
|
|
||||||
```console
|
```console
|
||||||
$ kubeclt get svc nginxsvc -o json | grep -i nodeport -C 5
|
$ kubectl get svc nginxsvc -o json | grep -i nodeport -C 5
|
||||||
{
|
{
|
||||||
"name": "http",
|
"name": "http",
|
||||||
"protocol": "TCP",
|
"protocol": "TCP",
|
||||||
@ -391,7 +391,7 @@ $ kubeclt get svc nginxsvc -o json | grep -i nodeport -C 5
|
|||||||
"nodePort": 30645
|
"nodePort": 30645
|
||||||
}
|
}
|
||||||
|
|
||||||
$ kubectl get nodes -o json | grep ExternalIP
|
$ kubectl get nodes -o json | grep ExternalIP -C 2
|
||||||
{
|
{
|
||||||
"type": "ExternalIP",
|
"type": "ExternalIP",
|
||||||
"address": "104.197.63.17"
|
"address": "104.197.63.17"
|
||||||
|
Loading…
Reference in New Issue
Block a user