Skip to content

Container Ports for pods vanishing #86273

Closed
@badaldavda

Description

@badaldavda

What happened:

  1. Created a pod with one container but two containerPorts 8080 and 8081 ---> Pod Config 1
  2. Now I changed both the container ports to 8080 and 8080, therefore one of them vanished. Pod Config 2
  3. Again applying 8080 and 8081 (Step1), it should again go to Config 1 but it shows only one of the ports 8080 or 8081 Pod.

What you expected to happen:
I expected it to have both containerPorts 8080 and 8081 that is go back to Config 1.

How to reproduce it (as minimally and precisely as possible):
Sharing shell scripts and yaml files with this
k8s_fail_patch_ports.tar.gz

Anything else we need to know?:
Step 4. If I reapply step 1, then containerPorts are set to 8080 and 8081 as expected.

Environment:

  • Kubernetes version (use kubectl version):
    Client Version: version.Info{Major:"1", Minor:"16", GitVersion:"v1.16.3", GitCommit:"b3cbbae08ec52a7fc73d334838e18d17e8512749", GitTreeState:"clean", BuildDate:"2019-11-14T04:24:34Z", GoVersion:"go1.12.13", Compiler:"gc", Platform:"darwin/amd64"}
    Server Version: version.Info{Major:"1", Minor:"13+", GitVersion:"v1.13.12-eks-c500e1", GitCommit:"c500e11584c323151d6ab17526d1ed7461e45b0c", GitTreeState:"clean", BuildDate:"2019-10-22T03:11:52Z", GoVersion:"go1.11.13", Compiler:"gc", Platform:"linux/amd64"}
  • Cloud provider or hardware configuration: AWS EKS
  • OS (e.g: cat /etc/os-release): Amazon linux 2
  • Kernel (e.g. uname -a): Darwin 8c85904334ae.ant.amazon.com 18.7.0 Darwin Kernel Version 18.7.0: Sat Oct 12 00:02:19 PDT 2019; root:xnu-4903.278.12~1/RELEASE_X86_64 x86_64
  • Install tools:NA
  • Network plugin and version (if this is a network-related bug):NA
  • Others:
    File with step 4
    Archive.zip

Metadata

Metadata

Assignees

No one assigned

    Labels

    kind/bugCategorizes issue or PR as related to a bug.needs-sigIndicates an issue or PR lacks a `sig/foo` label and requires one.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions