Skip to Main Content

Containers, Cloud Native & Kubernetes

Announcement

For appeals, questions and feedback, please email oracle-forums_moderators_us@oracle.com

Failing to Upgrade OKE Cluster using terraform.

user-hy1h6Apr 14 2023 — edited Apr 14 2023

Hi,

I'am trying to upgrade oke from v1.24.1 to v1.25.4 using terraform.
First i have created a cluster using Terraform with k8s version v1.24.1 using the nodepool image id: ocid1.image.oc1.phx.aaaaaaaafhnymeqt5q3437wiuckekjodt3funyfz6hxuanchpfoqzq6nhxrq (i.e Oracle-Linux-7.9-2023.01.31-2-OKE-1.24.1-549) in variables.tf file. Here, i have created 3 nodepools
Cluster is up and running

Then, i have changed the k8s version to v1.25.4 in variables.tf
Used target deploy in terraform to upgrade control plane.
terraform apply --target=module.oci-oke.oci_containerengine_cluster.oci_oke_cluster

Cluster got upgraded to v1.25.4

Then changed the nodepool image id: ocid1.image.oc1.phx.aaaaaaaas3s5ziwx2mvrrz6juwzqfck7u4m2sfgsiijp6qxh6ni4vasu5peq (i.e Oracle-Linux-7.9-2023.01.31-2-OKE-1.25.4-549) in variables.tf file and added 3 more new nodepools in terraform.tfvars file
terraform apply --auto-approve failing with below errors:

github link: https://github.com/anuddeeph1/oke-test-upgrade
getting the same error:

Error: 409-Conflict, Cannot update Kubernetes version which has already been set by OKE worker node image.
│ Suggestion: The resource is in a conflicted state. Please retry again or contact support for help with service: Containerengine Node Pool
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/containerengine_node_pool
│ API Reference: https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/UpdateNodePool
│ Request Target: PUT https://containerengine.us-phoenix-1.oci.oraclecloud.com/20180222/nodePools/ocid1.nodepool.oc1.phx.aaaaaaaay42rxjupv4rusffhdfo65vk5cxpyzfp7ak4fklq6jn3qehxdhxza
│ Provider version: 4.116.0, released on 2023-04-12.
│ Service: Containerengine Node Pool
│ Operation Name: UpdateNodePool
│ OPC request ID: 9c5aafb477164c86af947bc5a7936add/B1D12D0617746F1D9AD65F571C66E6E4/A348F832978634D463546FD916A4951E


│ with module.oci-oke.oci_containerengine_node_pool.oci_oke_node_pool["np1"],
│ on ../../oke.tf line 57, in resource "oci_containerengine_node_pool" "oci_oke_node_pool":
│ 57: resource "oci_containerengine_node_pool" "oci_oke_node_pool" {



│ Error: 409-Conflict, Kubernetes version does not match Kubernetes version of OKE worker node image (v1.24.1)
│ Suggestion: The resource is in a conflicted state. Please retry again or contact support for help with service: Containerengine Node Pool
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/containerengine_node_pool
│ API Reference: https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/CreateNodePool
│ Request Target: POST https://containerengine.us-phoenix-1.oci.oraclecloud.com/20180222/nodePools
│ Provider version: 4.116.0, released on 2023-04-12.
│ Service: Containerengine Node Pool
│ Operation Name: CreateNodePool
│ OPC request ID: edc03742777c8f09ceb059ca8f56dacd/C28373F0043C1A476E2533D3507CFFF8/4F9684F7EA66E8F7463C1030B3F2DD31


│ with module.oci-oke.oci_containerengine_node_pool.oci_oke_node_pool["np5"],
│ on ../../oke.tf line 57, in resource "oci_containerengine_node_pool" "oci_oke_node_pool":
│ 57: resource "oci_containerengine_node_pool" "oci_oke_node_pool" {



│ Error: 409-Conflict, Kubernetes version does not match Kubernetes version of OKE worker node image (v1.24.1)
│ Suggestion: The resource is in a conflicted state. Please retry again or contact support for help with service: Containerengine Node Pool
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/containerengine_node_pool
│ API Reference: https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/CreateNodePool
│ Request Target: POST https://containerengine.us-phoenix-1.oci.oraclecloud.com/20180222/nodePools
│ Provider version: 4.116.0, released on 2023-04-12.
│ Service: Containerengine Node Pool
│ Operation Name: CreateNodePool
│ OPC request ID: be85a4f40fcba457a181113c00ba8af1/37953B8F4C9EB81C6C93B4AA3920EAF4/C86A7E16C68F82D694AC224A290DB6E1


│ with module.oci-oke.oci_containerengine_node_pool.oci_oke_node_pool["np4"],
│ on ../../oke.tf line 57, in resource "oci_containerengine_node_pool" "oci_oke_node_pool":
│ 57: resource "oci_containerengine_node_pool" "oci_oke_node_pool" {



│ Error: 409-Conflict, Cannot update Kubernetes version which has already been set by OKE worker node image.
│ Suggestion: The resource is in a conflicted state. Please retry again or contact support for help with service: Containerengine Node Pool
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/containerengine_node_pool
│ API Reference: https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/UpdateNodePool
│ Request Target: PUT https://containerengine.us-phoenix-1.oci.oraclecloud.com/20180222/nodePools/ocid1.nodepool.oc1.phx.aaaaaaaa5hosu4h7twbffvbr6uzxwjgqjt5x5kubkl2qj47t2n32owfaljja
│ Provider version: 4.116.0, released on 2023-04-12.
│ Service: Containerengine Node Pool
│ Operation Name: UpdateNodePool
│ OPC request ID: 4633001db52d30245a1c20ff51965ce4/74E3935F7E3B2EB21167A378F241ABA3/88DD01CB194BC744F5E7C64620541F05


│ with module.oci-oke.oci_containerengine_node_pool.oci_oke_node_pool["np3"],
│ on ../../oke.tf line 57, in resource "oci_containerengine_node_pool" "oci_oke_node_pool":
│ 57: resource "oci_containerengine_node_pool" "oci_oke_node_pool" {



│ Error: 409-Conflict, Cannot update Kubernetes version which has already been set by OKE worker node image.
│ Suggestion: The resource is in a conflicted state. Please retry again or contact support for help with service: Containerengine Node Pool
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/containerengine_node_pool
│ API Reference: https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/UpdateNodePool
│ Request Target: PUT https://containerengine.us-phoenix-1.oci.oraclecloud.com/20180222/nodePools/ocid1.nodepool.oc1.phx.aaaaaaaa6bzpowrwa3z5grkr2f3v5anglkr6rbuyfhtdcmomsnokyv4b5z4a
│ Provider version: 4.116.0, released on 2023-04-12.
│ Service: Containerengine Node Pool
│ Operation Name: UpdateNodePool
│ OPC request ID: b89029a1b7706e181d137ba20e9adaaa/1681CE7619FA0A56CC8650D88E2CDBF7/D912D77A78453CD7F60BBFE99467F3A4


│ with module.oci-oke.oci_containerengine_node_pool.oci_oke_node_pool["np2"],
│ on ../../oke.tf line 57, in resource "oci_containerengine_node_pool" "oci_oke_node_pool":
│ 57: resource "oci_containerengine_node_pool" "oci_oke_node_pool" {



│ Error: 409-Conflict, Kubernetes version does not match Kubernetes version of OKE worker node image (v1.24.1)
│ Suggestion: The resource is in a conflicted state. Please retry again or contact support for help with service: Containerengine Node Pool
│ Documentation: https://registry.terraform.io/providers/oracle/oci/latest/docs/resources/containerengine_node_pool
│ API Reference: https://docs.oracle.com/iaas/api/#/en/containerengine/20180222/NodePool/CreateNodePool
│ Request Target: POST https://containerengine.us-phoenix-1.oci.oraclecloud.com/20180222/nodePools
│ Provider version: 4.116.0, released on 2023-04-12.
│ Service: Containerengine Node Pool
│ Operation Name: CreateNodePool
│ OPC request ID: 8346ee0f8afee1f688fd705106dea3ac/99106488847E42B23FCD991D390F8360/437114DFF83556524CC9C2744AFAC9C1


│ with module.oci-oke.oci_containerengine_node_pool.oci_oke_node_pool["np6"],
│ on ../../oke.tf line 57, in resource "oci_containerengine_node_pool" "oci_oke_node_pool":
│ 57: resource "oci_containerengine_node_pool" "oci_oke_node_pool" {

Thanks in Advance.

Comments
Post Details
Added on Apr 14 2023
2 comments
574 views