我刚刚安装了Kubernetes并配置了Master和Node,基本的事情还可以。
我可以部署部署,pod,服务,但是有一个问题。
1-几分钟后Docker容器退出并重新启动,所以我无法从外部访问此部署
2-主服务器未将节点IP分配给服务。
我不应该在这里分享什么代码。
这是pod的示例日志:
Name: hostnames-64fbcd9c87-6khf4
Namespace: default
Node: 164.132.1.86/164.132.1.86
Start Time: Mon, 27 Aug 2018 15:41:59 -0400
Labels: app=hostnames
pod-template-hash=2096785743
Annotations: <none>
Status: Running
IP: 172.30.53.7
Controlled By: ReplicaSet/hostnames-64fbcd9c87
Containers:
hostnames:
Container ID: docker://074ae800f3bbb81d31753b5eabc9c723bf2f49614fec884586ee3f7714664750
Image: k8s.gcr.io/serve_hostname
Image ID: docker-pullable://k8s.gcr.io/serve_hostname@sha256:07ab315083303397079209c526f6ed02f731d2fa7ffa0ad5c40b49410b105fee
Port: 9376/TCP
Host Port: 0/TCP
State: Running
Started: Mon, 27 Aug 2018 15:42:04 -0400
Ready: True
Restart Count: 0
Environment: <none>
Mounts: <none>
Conditions:
Type Status
Initialized True
Ready True
PodScheduled True
Volumes: <none>
QoS Class: BestEffort
Node-Selectors: <none>
Tolerations: <none>
Events: <none>
Type Reason Age From Message
---- ------ ---- ---- -------
Normal Scheduled 9m default-scheduler Successfully assigned
hostnames-64fbcd9c87-6khf4 to 164.132.1.86
Normal Pulling 9m kubelet, 164.132.1.86 pulling image
"k8s.gcr.io/serve_hostname"
Normal Pulled 9m kubelet, 164.132.1.86 Successfully pulled
image "k8s.gcr.io/serve_hostname"
Normal Created 9m kubelet, 164.132.1.86 Created container
Normal Started 9m kubelet, 164.132.1.86 Started container
我需要帮助。