Kubernetes test instance guestbook external network can not visit

After installing kubernetes, test Guestbook Example, that is, that redis example, want to access the guestbook outside the network, but has been unable to visit, I use the NodePorts configuration, visit http://192.168.199.20:30061/ failure,

Frontend-service.yaml is configured as follows:
ApiVersion: v1
Kind: Service
Metadata:
Name: frontend
Labels:
App: guestbook
Tier: frontend
Spec:
# If your cluster supports it, uncomment the following to automatically create
# An external load-balanced IP for the frontend service.
Type: NodePort
Ports:
# The port that this service should serve on
– port: 80
NodePort: 30061
Selector:
App: guestbook
Tier: frontend

Frontend-controller.yaml is configured as follows:
ApiVersion: v1
Kind: ReplicationController
Metadata:
Name: frontend
# These labels can be applied automatically
# From the labels in the pod template if not set
Labels:
App: guestbook
Tier: frontend
Spec:
# This replicas value is default
# Modify it according to your case
Replicas: 3
# Selector can be applied automatically
# From the labels in the pod template if not set
# Selector:
# App: guestbook
# Tier: frontend
Template:
Metadata:
Labels:
App: guestbook
Tier: frontend
Spec:
Containers:
– name: php-redis
Image: examples / guestbook / php-redis
Resources:
Requests:
Cpu: 100m
Memory: 100Mi
Env:
– name: GET_HOSTS_FROM
Value: dns
# If your cluster config does not include a dns service, then to
# Instead access environment variables to find service host
# Info, comment out the 'value: dns' line above, and uncomment the
# Line below
# Value: env
Ports:
– containerPort: 80

Did i configure that wrong? 2015-12-24 add comment share it

  • Weibo
  • QZONE
  • Micro letter

Did not find the relevant results

    Invited:

    Master12

    We agreed from:


    LoadBalancer way configuration I do not know configuration, hope to teach

    Heads up! This alert needs your attention, but it's not super important.