1
resposta

This site can’t be reached no linux

Não estou conseguindo acessar o ip

apiVersion: v1
kind: Service
metadata:
    name: svc-pod-1
spec:
    type: NodePort
    selector:
        app: primeiro-pod
    ports: 
        - port: 80
          nodePort: 30000
apiVersion: v1
kind: Pod
metadata:
  name: pod-1
  labels:
    app: primeiro-pod
spec:
  containers:
  - name: container-pod-1
    image: nginx:latest
    ports:
      - containerPort: 80
kubectl describe pod pod-1
Name:         pod-1
Namespace:    default
Priority:     0
Node:         minikube/192.168.49.2
Start Time:   Sun, 14 Mar 2021 19:01:37 -0300
Labels:       <none>
Annotations:  <none>
Status:       Running
IP:           172.17.0.22
IPs:
  IP:  172.17.0.22
Containers:
  container-pod-1:
    Container ID:   docker://6030b5b83f81977d14e18da794062e0b6060a4f1e84d7cb3be046a8c06b8cd4c
    Image:          nginx:latest
    Image ID:       docker-pullable://nginx@sha256:d2925188effb4ddca9f14f162d6fba9b5fab232028aa07ae5c1dab764dca8f9f
    Port:           80/TCP
    Host Port:      0/TCP
    State:          Running
      Started:      Sun, 14 Mar 2021 19:01:41 -0300
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /var/run/secrets/kubernetes.io/serviceaccount from default-token-nw7kk (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             True 
  ContainersReady   True 
  PodScheduled      True 
Volumes:
  default-token-nw7kk:
    Type:        Secret (a volume populated by a Secret)
    SecretName:  default-token-nw7kk
    Optional:    false
QoS Class:       BestEffort
Node-Selectors:  <none>
Tolerations:     node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                 node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  52m   default-scheduler  Successfully assigned default/pod-1 to minikube
  Normal  Pulling    52m   kubelet            Pulling image "nginx:latest"
  Normal  Pulled     52m   kubelet            Successfully pulled image "nginx:latest" in 2.556132438s
  Normal  Created    52m   kubelet            Created container container-pod-1
  Normal  Started    52m   kubelet            Started container container-pod-1
kubectl get nodes -o wide
NAME       STATUS   ROLES                  AGE   VERSION   INTERNAL-IP    EXTERNAL-IP   OS-IMAGE             KERNEL-VERSION     CONTAINER-RUNTIME
minikube   Ready    control-plane,master   13d   v1.20.2   192.168.49.2   <none>        Ubuntu 20.04.1 LTS   5.4.0-58-generic   docker://20.10.2

Acesso http://192.168.49.2:30000 e dá conexão recusada

1 resposta

Olá Rafael, tudo bem? Qual versão do Minikube/Kubernetes você instalou?

Quer mergulhar em tecnologia e aprendizagem?

Receba a newsletter que o nosso CEO escreve pessoalmente, com insights do mercado de trabalho, ciência e desenvolvimento de software