cookeem / kubeadm-ha

通过kubeadm安装kubernetes高可用集群,使用docker/containerd容器运行时,适用v1.24.x以上版本
MIT License
678 stars 275 forks source link

verify installation #8

Closed mtchuyen closed 6 years ago

mtchuyen commented 6 years ago

Hi cookeem !

In last steop deploy nginx application to verify installation, I must use an yml file to create Pod and Service.

I need config about hostnetwork in Deploy to query example (see: https://github.com/projectcalico/felix/issues/1361)

If don't have "hostNetwork: true", command curl always timeout.

this my sample:

apiVersion: v1
kind: Service
metadata:
  name: my-nginx
  labels:
    app: my-nginx
spec:
  type: NodePort
  ports:
  - port: 80
  selector:
    app: my-nginx
---
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: my-nginx
  labels:
    app: my-nginx
spec:
  replicas: 1
  template:
    metadata:
      labels:
        app: my-nginx
    spec:
      hostNetwork: true
      containers:
      - name: nginx
        image: nginx
        ports:
          - containerPort: 80
mtchuyen commented 6 years ago

I only run curl to master1 had reponse, pls help me

curl k8s-master2:31639

thanks

cookeem commented 6 years ago

It's no need to set hostNetwork, you should check your kube-proxy logs.