Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Container creation fails when using a combination of hostPort and hostIP in dual-stack environment #378

Closed
xcelsion opened this issue Aug 29, 2019 · 0 comments

Comments

@xcelsion
Copy link
Contributor

I'm running a combination of Cilium with dual-stack enabled and portmap setup for hostPort functionality. When creating a deployment with a container that specifies a combination of a hostPort and hostIP as per the given example. The container fails to create with the following error message:

Warning  FailedCreatePodSandBox  2s  kubelet, w-02  Failed create pod sandbox: rpc error: code = Unknown desc = failed to setup network for sandbox "2c67ca0cb4d766f76e9c9194fd76e2919f5de8f43a9ee65a70f5b40c07d2dbea": unable to setup DNAT: running [/sbin/ip6tables -t nat -C CNI-DN-9b9451c2f1d1806c603ed -p tcp --dport 80 -d 142.93.228.87 -j DNAT --to-destination [f00d::a57:0:0:be97]:80 --wait]: exit status 2: ip6tables v1.6.1: host/network `142.93.228.87' not found
Try `ip6tables -h' or 'ip6tables --help' for more information.

Example deployment:

kubectl create -f - <<EOF
apiVersion: extensions/v1beta1
kind: Deployment
metadata:
  name: ubuntu
spec:
  replicas: 1
  selector:
    matchLabels:
      app: ubuntu
  template:
    metadata:
      labels:
        app: ubuntu
    spec:
      nodeSelector:
        kubernetes.io/hostname: w-02
      containers:
        - name: ubuntu
          image: ubuntu:18.04
          command:
            - tail
            - -f
            - /dev/null
          ports:
            - containerPort: 80
              hostIP: 142.93.228.87
              hostPort: 80
EOF
xcelsion pushed a commit to xcelsion/containernetworking-plugins that referenced this issue Aug 30, 2019
xcelsion pushed a commit to xcelsion/containernetworking-plugins that referenced this issue Aug 30, 2019
xcelsion pushed a commit to xcelsion/containernetworking-plugins that referenced this issue Aug 30, 2019
xcelsion added a commit to xcelsion/containernetworking-plugins that referenced this issue Sep 6, 2019
@squeed squeed closed this as completed in e8365e1 Sep 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant