我有5台机器运行Ubuntu 16.04.1 LTS。我想将它们设置为Kubernetes Cluster。我试着按照getting started guide使用kubeadm
。
这一切都很好,直到步骤 3/4安装pod网络。我看了addon page寻找一个pod网络并选择了法兰绒覆盖网络。我将yaml文件复制到机器上并执行:
root@up01:/home/up# kubectl apply -f flannel.yml
导致:
configmap "kube-flannel-cfg" created
daemonset "kube-flannel-ds" created
所以我认为它没问题,但是当我显示所有pod内容时:
root@up01:/etc/kubernetes/manifests# kubectl get pods --all-namespaces
NAMESPACE NAME READY STATUS RESTARTS AGE
kube-system dummy-2088944543-d5f50 1/1 Running 0 50m
kube-system etcd-up01 1/1 Running 0 48m
kube-system kube-apiserver-up01 1/1 Running 0 50m
kube-system kube-controller-manager-up01 1/1 Running 0 49m
kube-system kube-discovery-1769846148-jvx53 1/1 Running 0 50m
kube-system kube-dns-2924299975-prlgf 0/4 ContainerCreating 0 49m
kube-system kube-flannel-ds-jb1df 2/2 Running 0 32m
kube-system kube-proxy-rtcht 1/1 Running 0 49m
kube-system kube-scheduler-up01 1/1 Running 0 49m
问题是kube-dns保持在ContainerCreating状态。我不知道该怎么办。
答案 0 :(得分:5)
您很可能错过了指南中的这一重要信息:
如果您想使用法兰绒作为pod网络,请指定 --pod-network-cidr 10.244.0.0/16如果你正在使用下面的守护进程清单。
如果省略此class MyViewController: UIViewController {
var textField: UITextField!
private let textFieldValuePipe = Signal<String?, NoError>.pipe()
var textFieldValueSignal: Signal<String?, NoError>!
override func viewDidLoad() {
// Initialize the text field
// ...
// Bind the text of the text field to the signal pipe's output
textField.reactive.text <~ textFieldValuePipe.output
// A signal of text values emitted by the text field upon end of editing.
let textFieldValuesSignal = textField.reactive.textValues
// A signal of text values emitted by the text field upon any changes.
let textFieldContinuousValuesSignal = textField.reactive.continuousTextValues
// Merge the relevant signals
textFieldValueSignal = Signal.merge(textFieldValuesSignal, textFieldContinuousValuesSignal, textFieldValuePipe.output)
// This will print the text field's value when it's changed by the user or programmatically
textFieldValueSignal.observeValues { value in
print(value ?? "nil")
}
}
// Use this to change the text field's value programmatically
func setTextFieldText(_ text: String?) {
textFieldValuePipe.input.send(value: text)
}
}
,则永远不会离开kube-dns
状态。
您的ContainerCreating
命令应为:
kubeadm init
而不是
# kubeadm init --pod-network-cidr 10.244.0.0/16
答案 1 :(得分:1)
您是否尝试重启NetworkManager ...?它对我有用..另外,当我也禁用IPv6时,它也有效。