Skip to content

k8s follow-up - Action fails to patch ephemeral container to pod #109

@davidferlay

Description

@davidferlay

Context

  • Followup of k8s support which introduces container.runtime: kubernetes

Observed

  • Executing an action fails with failed to patch ephemeral container to pod: the server could not find the requested resource
➜ k3s kubectl get pod/plasmactl-platform-var-get-funny-meninsky -o jsonpath="{.spec.initContainers[*].name} {.spec.containers[*].name}"
supervisor
➜ k3s kubectl describe pod/plasmactl-platform-var-get-compassionate-lalande        
Name:         plasmactl-platform-var-get-compassionate-lalande
Namespace:    default
Priority:     0
Node:         sdc/10.56.237.109
Start Time:   Mon, 19 May 2025 16:52:08 +0200
Labels:       <none>
Annotations:  <none>
Status:       Running
IP:           10.42.0.15
IPs:
  IP:  10.42.0.15
Containers:
  supervisor:
    Container ID:  containerd://76990db92ae1db3eb1af19e03443a378f6097f37c532e536ddd46970338ab232
    Image:         alpine:latest
    Image ID:      docker.io/library/alpine@sha256:a8560b36e8b8210634f77d9f7f9efd7ffa463e380b75e2e74aff4511df3ef88c
    Port:          <none>
    Host Port:     <none>
    Command:
      sleep
    Args:
      infinity
    State:          Running
      Started:      Mon, 19 May 2025 16:52:09 +0200
    Ready:          True
    Restart Count:  0
    Environment:    <none>
    Mounts:
      /action from plasmactl-platform-var-get-compassionate-lalande-1 (rw)
      /host from plasmactl-platform-var-get-compassionate-lalande-0 (rw)
      /var/run/secrets/kubernetes.io/serviceaccount from kube-api-access-94thb (ro)
Conditions:
  Type              Status
  Initialized       True 
  Ready             True 
  ContainersReady   True 
  PodScheduled      True 
Volumes:
  plasmactl-platform-var-get-compassionate-lalande-0:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     
    SizeLimit:  <unset>
  plasmactl-platform-var-get-compassionate-lalande-1:
    Type:       EmptyDir (a temporary directory that shares a pod's lifetime)
    Medium:     
    SizeLimit:  <unset>
  kube-api-access-94thb:
    Type:                    Projected (a volume that contains injected data from multiple sources)
    TokenExpirationSeconds:  3607
    ConfigMapName:           kube-root-ca.crt
    ConfigMapOptional:       <nil>
    DownwardAPI:             true
QoS Class:                   BestEffort
Node-Selectors:              <none>
Tolerations:                 node.kubernetes.io/not-ready:NoExecute op=Exists for 300s
                             node.kubernetes.io/unreachable:NoExecute op=Exists for 300s
Events:
  Type    Reason     Age   From               Message
  ----    ------     ----  ----               -------
  Normal  Scheduled  17s   default-scheduler  Successfully assigned default/plasmactl-platform-var-get-compassionate-lalande to sdc
  Normal  Pulling    17s   kubelet            Pulling image "alpine:latest"
  Normal  Pulled     16s   kubelet            Successfully pulled image "alpine:latest" in 1.28390644s
  Normal  Created    16s   kubelet            Created container supervisor
  Normal  Started    16s   kubelet            Started container supervisor
➜  skilld-docker-container-df git:(k3s) docker inspect platform-actions-variable-get:latest                      
[
    {
        "Id": "sha256:a45232b7973f05a54f690790e84318cb1e894336f36364a694965027823aa993",
        "RepoTags": [
            "platform-actions-variable-get:latest"
        ],
        "RepoDigests": [],
        "Parent": "sha256:bda5f3fcd4c12b3b4fd28dfd5bb1585cbebc94aa1209621897a9f1d682c29269",
        "Comment": "",
        "Created": "2025-05-19T14:54:52.610577996Z",
        "DockerVersion": "27.3.1",
        "Author": "",
        "Config": {
            "Hostname": "",
            "Domainname": "",
            "User": "plasma",
            "AttachStdin": false,
            "AttachStdout": false,
            "AttachStderr": false,
            "Tty": false,
            "OpenStdin": false,
            "StdinOnce": false,
            "Env": [
                "PATH=/home/plasma/.python/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin",
                "ANSIBLE_LOCAL_TEMP=/tmp/.ansible",
                "ANSIBLE_CONFIG=./ansible.cfg",
                "PYTHON_DIR=/home/plasma/.python",
                "PYTHONPATH=:library:platform/entities/roles/resource/files/python:platform/entities/roles/application/files/python:platform/entities/roles/service/files/python:platform/entities/roles/flow/files/python:platform/entities/roles/executor/files/python:platform/entities/roles/skill/files/python:platform/entities/roles/sysentity/files/python:platform/entities/roles/software/files/python:platform/entities/roles/function/files/python:platform/entities/roles/helper/files/python:platform/entities/roles/builder/files/python:platform/entities/roles/library/files/python",
                "VIRTUAL_ENV=/home/plasma/.python"
            ],
            "Cmd": [
                "/bin/sh"
            ],
            "Image": "sha256:bda5f3fcd4c12b3b4fd28dfd5bb1585cbebc94aa1209621897a9f1d682c29269",
            "Volumes": null,
            "WorkingDir": "/host",
            "Entrypoint": null,
            "OnBuild": null,
            "Labels": null
        },
        "Architecture": "amd64",
        "Os": "linux",
        "Size": 415026971,
        "GraphDriver": {
            "Data": null,
            "Name": "btrfs"
        },
        "RootFS": {
            "Type": "layers",
            "Layers": [
                "sha256:94e5f06ff8e3d4441dc3cd8b090ff38dc911bfa8ebdb0dc28395bc98f82f983f",
                "sha256:c7d183ffc37132b1aa998c372828b461c3b48fb675fe5c65159151f3e58dd4ea",
                "sha256:712d455da843d20d80d4ed9768890fa45e1480f5b36717ebc86df8f3bdc9d528",
                "sha256:46a94c6c7c9d87dabd6441d837933db799556cffe684f9795ff42054ed9a2f31"
            ]
        },
        "Metadata": {
            "LastTagTime": "2025-05-19T16:54:52.856936152+02:00"
        }
    }
]

Expected

  • Executing action should successfully attach action image to created pod

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions