Skip to content

Instantly share code, notes, and snippets.

@erangaeb
Created December 3, 2022 19:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save erangaeb/1483a19c9b8e6cd460ff389e197fbd49 to your computer and use it in GitHub Desktop.
Save erangaeb/1483a19c9b8e6cd460ff389e197fbd49 to your computer and use it in GitHub Desktop.
run nginx
# run nginx
kubectl apply -f nginx1.yaml
kubectl apply -f nginx2.yaml
❯❯ kubectl get pods | grep nginx
nginx1 1/1 Running 0 64m
nginx2 1/1 Running 0 62m
❯❯ kubectl get svc | grep nginx
nginx1 LoadBalancer 10.110.184.190 <pending> 80:32198/TCP 65m
nginx2 LoadBalancer 10.96.206.103 <pending> 80:30533/TCP 63m
# nginx service has the label `app.kubernetes.io/component=blackbox`
❯❯ kubectl describe svc nginx1
Name: nginx1
Namespace: default
Labels: app.kubernetes.io/component=blackbox
name=nginx1
Annotations: <none>
Selector: app=nginx1
Type: LoadBalancer
IP Family Policy: SingleStack
IP Families: IPv4
IP: 10.110.184.190
IPs: 10.110.184.190
Port: <unset> 80/TCP
TargetPort: 80/TCP
NodePort: <unset> 32198/TCP
Endpoints: 172.17.0.7:80
Session Affinity: None
External Traffic Policy: Cluster
Events: <none>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment