Copy a Kubernetes pod and run commands in its environment

Related tags

DevOps Tools copypod
Overview

copypod

Utility for copying a running Kubernetes pod so you can run commands in a copy of its environment, without worrying about it the pod potentially being removed due to a deploy.

copypod can work in two different modes, depending on if the --interactive flag is provided:

  • If the flag is left out, copypod will copy the specified pod and start it. When the pod reaches the "Running" state the name of the pod will be outputted as the only output. This is intended for use in automation scenarios.
  • If a command is provided with the --interactive flag, then the pod will be copied and started as before, but when the pod is running kubectl will be called and connect to the pod where the provided command is then run interactively. When the kubectl program exits the pod will be removed. This is intended for running ad-hoc tasks and processes.

Install

You can either install copypod into a virtual environment directly with:

pip install git+ssh://[email protected]/Memrise/copypod.git

then the program will be available as copypod inside the virtual environment, or you can install it by cloning this repository and then use pipenv to set up a virtual environment where it will get installed into:

git clone [email protected]:Memrise/copypod.git
cd copypod/
pipenv install

Then you can run the program with pipenv run copypod.

Usage

$ copypod --help
usage: copypod [-h] [--context CONTEXT] [-n NAMESPACE] (-l SELECTOR | -p POD) [--container CONTAINER] [-c COMMAND] [-i INTERACTIVE]

Copy a Kubernetes pod and run commands in its environment.

optional arguments:
  -h, --help            show this help message and exit
  --context CONTEXT     Kubectl context to use for configuration (default: None)
  -n NAMESPACE, --namespace NAMESPACE
                        Namespace for where the source pod is located (default: default)
  -l SELECTOR, --selector SELECTOR
                        Label selector of pod to copy (default: None)
  -p POD, --pod POD     Name of the pod to copy (default: None)
  --container CONTAINER
                        Name of container to copy, only needed if the pod has more than one container (default: None)
  -c COMMAND, --command COMMAND
                        Initial command to run in the copied pod (default: sleep infinity)
  -i INTERACTIVE, --interactive INTERACTIVE
                        Command to run in an interactive console (default: None)
  --image IMAGE         Copy the entire environment of the pod but use this Docker image instead (default: None)

If the `--interactive` flag is provided, the copied pod will be removed immediately after the command exits, otherwise the name of the pod will be printed.

Examples

Say you wanted to copy the pod named my-great-pod and have the copied pod run until you specifically remove it, you could run:

$ copypod -p my-great-pod
pod-copy-girwak

pod-copy-girwak is then the name of the new pod created for you, and it will by default run sleep infinity as the starting command, meaning it will keep running forever until it's deleted.

At this point you can enter the pod and run commands as you'd like, for instance start a shell inside the pod with:

$ kubectl exec -it pod-copy-girwak -- bash
root@pod-copy-girwak:/#

When you are done you can remove the copied pod again with kubectl:

$ kubectl delete pod pod-copy-girwak
pod "pod-copy-girwak" deleted

Say you instead would like to copy a pod, start a shell in the copied pod and have the pod be deleted when you exit the shell, you can do that by supplying the --interactive flag like this:

$ copypod -p my-great-pod -i bash
root@pod-copy-i41u04:/# ps -ef
UID        PID  PPID  C STIME TTY          TIME CMD
root         1     0  0 10:43 ?        00:00:00 sleep infinity
root         7     0  0 10:43 ?        00:00:00 bash
root        13     7  0 10:43 ?        00:00:00 ps -ef

When you are done doing what you needed the pod for, you can exit the shell and the pod will be removed immediately.

The value for the --interactive flag is the command you'd like to start inside the pod.


Instead of having to look up the name of a pod before running copypod, you can also specify labels which match one or more pods that you'd like to copy. copypod will then pick the first pod matching the lables and copy that for you. This can be done with the --selector flag. It works the same way as for the kubectl command.

If we for example have one or more pods with the label app: my-great-service we can copy any of those pods without having to know the exact pod name by running:

$ copypod -l app=my-great-service -i bash
root@pod-copy-1gk57f:/#

Note regarding Alpine Linux

The sleep command in images based on Alpine Linux does not support "infinity" as an argument unless the "coreutils" package is installed. As a work around you can instead specify --command "sleep 1d" as an argument to copypod to change the command run in the new pod.

Comments
  • Bump kubernetes from 24.2.0 to 25.3.0

    Bump kubernetes from 24.2.0 to 25.3.0

    Bumps kubernetes from 24.2.0 to 25.3.0.

    Release notes

    Sourced from kubernetes's releases.

    Kubernetes Python Client v25.3.0 Stable Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v25.3.0.zip
    cd client-python-v25.3.0
    python setup.py install
    

    Then follow examples in https://github.com/kubernetes-client/python/tree/release-25.0/examples

    Changelog: https://github.com/kubernetes-client/python/blob/release-25.0/CHANGELOG.md

    Kubernetes Python Client v25.3.0 Beta 1 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v25.3.0b1.zip
    cd client-python-v25.3.0b1
    python setup.py install
    

    Then follow examples in https://github.com/kubernetes-client/python/tree/release-25.0/examples

    Changelog: https://github.com/kubernetes-client/python/blob/release-25.0/CHANGELOG.md

    Kubernetes Python Client v25.2.0 Alpha 1 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v25.2.0a1.zip
    cd client-python-v25.2.0a1
    </tr></table> 
    

    ... (truncated)

    Changelog

    Sourced from kubernetes's changelog.

    v25.3.0

    Kubernetes API Version: v1.25.3

    Feature

    • Adds support for loading CA certificates from a file using the idp-certificate-authority key for the oidc plugin. (#1916, @​vgupta3)

    v25.3.0b1

    Kubernetes API Version: v1.25.3

    Feature

    • Adds support for loading CA certificates from a file using the idp-certificate-authority key for the oidc plugin. (#1916, @​vgupta3)

    v25.2.0b1

    Kubernetes API Version: v1.25.3

    Feature

    • Adds support for loading CA certificates from a file using the idp-certificate-authority key for the oidc plugin. (#1916, @​vgupta3)

    v25.2.0a1

    Kubernetes API Version: v1.25.2

    API Change

    • Revert regression that prevented client-go latency metrics to be reported with a template URL to avoid label cardinality. (kubernetes/kubernetes#112055, @​aanm) [SIG API Machinery]
    • Add NodeInclusionPolicy to TopologySpreadConstraints in PodSpec. (kubernetes/kubernetes#108492, @​kerthcet)
    • Added KMS v2alpha1 support. (kubernetes/kubernetes#111126, @​aramase)
    • Added a deprecated warning for node beta label usage in PV/SC/RC and CSI Storage Capacity. (kubernetes/kubernetes#108554, @​pacoxu)
    • Added a new feature gate CheckpointRestore to enable support to checkpoint containers. If enabled it is possible to checkpoint a container using the newly kubelet API (/checkpoint/{podNamespace}/{podName}/{containerName}). (kubernetes/kubernetes#104907, @​adrianreber) [SIG Node and Testing]
    • Added alpha support for user namespaces in pods phase 1 (KEP 127, feature gate: UserNamespacesStatelessPodsSupport) (kubernetes/kubernetes#111090, @​rata)
    • As of v1.25, the PodSecurity restricted level no longer requires pods that set .spec.os.name="windows" to also set Linux-specific securityContext fields. If a 1.25+ cluster has unsupported out-of-skew nodes prior to v1.23 and wants to ensure namespaces enforcing the restricted policy continue to require Linux-specific securityContext fields on all pods, ensure a version of the restricted prior to v1.25 is selected by labeling the namespace (for example, pod-security.kubernetes.io/enforce-version: v1.24) (kubernetes/kubernetes#105919, @​ravisantoshgudimetla)
    • Changed ownership semantics of PersistentVolume's spec.claimRef from atomic to granular. (kubernetes/kubernetes#110495, @​alexzielenski)
    • Extended ContainerStatus CRI API to allow runtime response with container resource requests and limits that are in effect.
    • For v1.25, Kubernetes will be using Golang 1.19, In this PR the version is updated to 1.19rc2 as GA is not yet available. (kubernetes/kubernetes#111254, @​dims)
    • Introduced NodeIPAM support for multiple ClusterCIDRs (kubernetes/kubernetes#2593) as an alpha feature. Set feature gate MultiCIDRRangeAllocator=true, determines whether the MultiCIDRRangeAllocator controller can be used, while the kube-controller-manager flag below will pick the active controller. Enabled the MultiCIDRRangeAllocator by setting --cidr-allocator-type=MultiCIDRRangeAllocator flag in kube-controller-manager. (kubernetes/kubernetes#109090, @​sarveshr7)
    • Introduced PodHasNetwork condition for pods. (kubernetes/kubernetes#111358, @​ddebroy)
    • Introduced support for handling pod failures with respect to the configured pod failure policy rules. (kubernetes/kubernetes#111113, @​mimowo)
    • Introduction of the DisruptionTarget pod condition type. Its reason field indicates the reason for pod termination:
      • PreemptionByKubeScheduler (Pod preempted by kube-scheduler)
      • DeletionByTaintManager (Pod deleted by taint manager due to NoExecute taint)
      • EvictionByEvictionAPI (Pod evicted by Eviction API)
      • DeletionByPodGC (an orphaned Pod deleted by PodGC) (kubernetes/kubernetes#110959, @​mimowo)
    • Kube-Scheduler ComponentConfig is graduated to GA, kubescheduler.config.k8s.io/v1 is available now. Plugin SelectorSpread is removed in v1. (kubernetes/kubernetes#110534, @​kerthcet)
    • Local Storage Capacity Isolation feature is GA in 1.25 release. For systems (rootless) that cannot check root file system, please use kubelet config --local-storage-capacity-isolation=false to disable this feature. Once disabled, pod cannot set local ephemeral storage request/limit, and emptyDir sizeLimit niether. (kubernetes/kubernetes#111513, @​jingxu97)

    ... (truncated)

    Commits
    • e884070 Merge pull request #1937 from yliaog/automated-release-of-25.3.0-upstream-rel...
    • 03d2958 updated 25.3 release support matrix
    • fd673fb generated client change
    • 90a9052 generated API change
    • cef4c9c generated client change for custom_objects
    • ea36451 update version constants for 25.3.0 release
    • 92ea48b update changelog with release notes from master branch
    • 73b51ec Merge pull request #1931 from yliaog/automated-release-of-25.3.0b1-upstream-r...
    • c91762f updated compatibility matrix for 25.3.0b1
    • 1d5b9ec generated client change
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 1
  • Bump certifi from 2022.9.24 to 2022.12.7

    Bump certifi from 2022.9.24 to 2022.12.7

    Bumps certifi from 2022.9.24 to 2022.12.7.

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
  • Bump oauthlib from 3.2.0 to 3.2.1

    Bump oauthlib from 3.2.0 to 3.2.1

    Bumps oauthlib from 3.2.0 to 3.2.1.

    Release notes

    Sourced from oauthlib's releases.

    3.2.1

    In short

    OAuth2.0 Provider:

    • #803 : Metadata endpoint support of non-HTTPS
    • CVE-2022-36087

    OAuth1.0:

    • #818 : Allow IPv6 being parsed by signature

    General:

    • Improved and fixed documentation warnings.
    • Cosmetic changes based on isort

    What's Changed

    New Contributors

    Full Changelog: https://github.com/oauthlib/oauthlib/compare/v3.2.0...v3.2.1

    Changelog

    Sourced from oauthlib's changelog.

    3.2.1 (2022-09-09)

    OAuth2.0 Provider:

    • #803: Metadata endpoint support of non-HTTPS
    • CVE-2022-36087

    OAuth1.0:

    • #818: Allow IPv6 being parsed by signature

    General:

    • Improved and fixed documentation warnings.
    • Cosmetic changes based on isort
    Commits
    • 88bb156 Updated date and authors
    • 1a45d97 Prepare 3.2.1 release
    • 0adbbe1 docs: fix typos
    • 6569ec3 docs: Fix a few typos
    • bdc486e Fixed isort imports
    • 7db45bd Fix typo in server.rst
    • b14ad85 chore: s/bode_code_verifier/body_code_verifier/g
    • b123283 Allow non-HTTPS issuer when OAUTHLIB_INSECURE_TRANSPORT. (#803)
    • 2f887b5 Docs: fix Sphinx warnings for better ReadTheDocs generation (#807)
    • d4bafd9 Merge pull request #797 from cclauss/patch-2
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself) You can disable automated security fix PRs for this repo from the Security Alerts page.
    dependencies 
    opened by dependabot[bot] 0
  • Bump kubernetes from 23.6.0 to 24.2.0

    Bump kubernetes from 23.6.0 to 24.2.0

    Bumps kubernetes from 23.6.0 to 24.2.0.

    Release notes

    Sourced from kubernetes's releases.

    Kubernetes Python Client v24.2.0 Stable Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v24.2.0.zip
    cd client-python-v24.2.0
    python setup.py install
    

    Then follow examples in https://github.com/kubernetes-client/python/tree/release-24.0/examples

    Changelog: https://github.com/kubernetes-client/python/blob/release-24.0/CHANGELOG.md

    Kubernetes Python Client v24.1.0 Beta 1 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v24.1.0b1.zip
    cd client-python-v24.1.0b1
    python setup.py install
    

    Then follow examples in https://github.com/kubernetes-client/python/tree/release-24.0/examples

    Changelog: https://github.com/kubernetes-client/python/blob/release-24.0/CHANGELOG.md

    Kubernetes Python Client v24.1.0 Alpha 1 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v24.1.0a1.zip
    cd client-python-v24.1.0a1
    </tr></table> 
    

    ... (truncated)

    Changelog

    Sourced from kubernetes's changelog.

    v24.2.0

    Kubernetes API Version: v1.24.2

    Uncategorized

    • The dynamic client now support the _request_timeout parameter to configure connection and request timeouts. (#1732, @​philipp-sontag-by)

    v24.1.0b1

    Kubernetes API Version: v1.24.1

    Uncategorized

    • The dynamic client now support the _request_timeout parameter to configure connection and request timeouts. (#1732, @​philipp-sontag-by)

    v24.1.0a1

    Kubernetes API Version: v1.24.1

    API Change

    ... (truncated)

    Commits
    • 0406e1c Merge pull request #1838 from yliaog/automated-release-of-24.2.0-upstream-rel...
    • 7cfc353 added compatibility matrix for 1.24.2 release.
    • 9732f83 generated client change
    • 119ecd5 update version constants for 24.2.0 release
    • ec48a03 update changelog with release notes from master branch
    • 1ea21da Revert "Add interactive configuration to exec provider."
    • 59ee365 Add interactive configuration to exec provider.
    • 7f3b29d Bump helm/kind-action from 1.2.0 to 1.3.0
    • 03f84f3 Bump actions/setup-python from 3 to 4
    • 36bd3ff Merge pull request #1827 from yliaog/automated-release-of-24.1.0b1-upstream-r...
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump kubernetes from 23.3.0 to 23.6.0

    Bump kubernetes from 23.3.0 to 23.6.0

    Bumps kubernetes from 23.3.0 to 23.6.0.

    Release notes

    Sourced from kubernetes's releases.

    Kubernetes Python Client v23.6.0 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v23.6.0.zip
    cd client-python-v23.6.0
    python setup.py install
    

    Then follow examples in https://github.com/kubernetes-client/python/tree/release-23.0/examples

    Changelog: https://github.com/kubernetes-client/python/blob/release-23.0/CHANGELOG.md

    Changelog

    Sourced from kubernetes's changelog.

    v23.6.0

    Kubernetes API Version: v1.23.6

    API Change

    • Omits alpha-level enums from the static openapi file captured in api/openapi-spec (kubernetes/kubernetes#109179, @​liggitt) [SIG Apps and Auth]
    • Fixes a regression in v1beta1 PodDisruptionBudget handling of "strategic merge patch"-type API requests for the selector field. Prior to 1.21, these requests would merge matchLabels content and replace matchExpressions content. In 1.21, patch requests touching the selector field started replacing the entire selector. This is consistent with server-side apply and the v1 PodDisruptionBudget behavior, but should not have been changed for v1beta1. (kubernetes/kubernetes#108139, @​liggitt) [SIG Auth and Testing]
    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump kubernetes from 22.6.0 to 23.3.0

    Bump kubernetes from 22.6.0 to 23.3.0

    Bumps kubernetes from 22.6.0 to 23.3.0.

    Release notes

    Sourced from kubernetes's releases.

    Kubernetes Python Client v23.3.0 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v23.3.0.zip
    cd client-python-v23.3.0
    python setup.py install
    

    Then follow examples in https://github.com/kubernetes-client/python/tree/release-23.0/examples

    Changelog: https://github.com/kubernetes-client/python/blob/release-23.0/CHANGELOG.md

    Kubernetes Python Client v23.3.0 Beta 1 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v23.3.0b1.zip
    cd client-python-v23.3.0b1
    python setup.py install
    

    Then follow examples in https://github.com/kubernetes-client/python/tree/release-23.0/examples

    Changelog: https://github.com/kubernetes-client/python/blob/release-23.0/CHANGELOG.md

    Kubernetes Python Client v23.3.0 Alpha 1 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v23.3.0a1.zip
    cd client-python-v23.3.0a1
    </tr></table> 
    

    ... (truncated)

    Changelog

    Sourced from kubernetes's changelog.

    v23.3.0

    Kubernetes API Version: v1.23.4

    v23.3.0b1

    Kubernetes API Version: v1.23.4

    API Change

    v23.3.0a1

    Kubernetes API Version: v1.23.3

    API Change

    ... (truncated)

    Commits

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump kubernetes from 21.7.0 to 22.6.0

    Bump kubernetes from 21.7.0 to 22.6.0

    Bumps kubernetes from 21.7.0 to 22.6.0.

    Release notes

    Sourced from kubernetes's releases.

    Kubernetes Python Client v22.6.0 Stable Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v22.6.0.zip
    cd client-python-v22.6.0
    python setup.py install
    

    Then follow examples in https://github.com/kubernetes-client/python/tree/release-22.0/examples

    Changelog: https://github.com/kubernetes-client/python/blob/release-22.0/CHANGELOG.md

    Kubernetes Python Client v22.6.0 Beta 1 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v22.6.0b1.zip
    cd client-python-v22.6.0b1
    python setup.py install
    

    Then follow examples in https://github.com/kubernetes-client/python/tree/release-22.0/examples

    Changelog: https://github.com/kubernetes-client/python/blob/release-22.0/CHANGELOG.md

    Kubernetes Python Client v22.6.0 Alpha 1 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v22.6.0a1.zip
    cd client-python-v22.6.0a1
    </tr></table> 
    

    ... (truncated)

    Changelog

    Sourced from kubernetes's changelog.

    v22.6.0

    Kubernetes API Version: v1.22.6

    Bug or Regression

    • Notable feature additions for async creation of Custom resources using dynamic Client (#1697, @​venukarnati92)

    Feature

    v22.6.0b1

    Kubernetes API Version: v1.22.6

    Feature

    v22.6.0a1

    Kubernetes API Version: v1.22.6

    API Change

    ... (truncated)

    Commits
    • 44453c3 Merge pull request #1704 from yliaog/automated-release-of-22.6.0-upstream-rel...
    • 770cbee Updated the compatibility matrix and maintenance status
    • 16ec19d generated client change
    • 382484f update version constants for 22.6.0 release
    • c0b3d3b update changelog with release notes from master branch
    • 115a970 Generate and upload code coverage
    • 649c5fe Async fix for Dynamic Client
    • 386ff93 Bump actions/setup-python from 2.3.1 to 2.3.2
    • 4e83cb7 Merge pull request #1695 from yliaog/automated-release-of-22.6.0b1-upstream-r...
    • 9ec2a3f generated client change
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Bump kubernetes from 20.13.0 to 21.7.0

    Bump kubernetes from 20.13.0 to 21.7.0

    Bumps kubernetes from 20.13.0 to 21.7.0.

    Release notes

    Sourced from kubernetes's releases.

    Kubernetes Python Client v21.7.0 Stable Release

    Getting started:

    pip install kubernetes==21.7.0
    

    Or from source, download attached zip file, then

    unzip client-python-21.7.0.zip
    cd client-python-21.7.0
    python setup.py install
    

    Then follow examples in https://github.com/kubernetes-client/python/tree/release-21.0/examples.

    Changelog: https://github.com/kubernetes-client/python/blob/release-21.0/CHANGELOG.md

    Kubernetes Python Client v21.7.0 Beta 1 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v21.7.0b1.zip
    cd client-python-v21.7.0b1
    python setup.py install
    

    Then follow examples in https://github.com/kubernetes-client/python/tree/release-21.0/examples

    Changelog: https://github.com/kubernetes-client/python/blob/release-21.0/CHANGELOG.md

    Kubernetes Python Client v21.7.0 Alpha 1 Release

    Getting started:

    pip install --pre --upgrade kubernetes
    

    Or from source, download attached zip file, then

    unzip client-python-v21.7.0a1.zip
    cd client-python-v21.7.0a1
    </tr></table> 
    

    ... (truncated)

    Changelog

    Sourced from kubernetes's changelog.

    v21.7.0

    Kubernetes API Version: v1.21.7

    Bug or Regression

    v21.7.0b1

    Kubernetes API Version: v1.21.7

    v21.7.0a1

    Kubernetes API Version: v1.21.7

    API Change

    • Kube-apiserver: Fixes handling of CRD schemas containing literal null values in enums (#104989, @​liggitt) [SIG API Machinery, Apps and Network]
    • "Auto" is now a valid value for the service.kubernetes.io/topology-aware-hints annotation. (kubernetes/kubernetes#100728, @​robscott) [SIG Apps, Instrumentation and Network]
    • We have added a new Priority & Fairness rule that exempts all probes (/readyz, /healthz, /livez) to prevent restarting of "healthy" kube-apiserver instance(s) by kubelet. (kubernetes/kubernetes#101111, @​tkashem) [SIG API Machinery]
      1. PodAffinityTerm includes a namespaceSelector field to allow selecting eligible namespaces based on their labels.
      2. A new CrossNamespacePodAffinity quota scope API that allows restricting which namespaces allowed to use PodAffinityTerm with corss-namespace reference via namespaceSelector or namespaces fields. (kubernetes/kubernetes#98582, @​ahg-g) [SIG API Machinery, Apps, Auth and Testing]
    • Add Probe-level terminationGracePeriodSeconds field (kubernetes/kubernetes#99375, @​ehashman) [SIG API Machinery, Apps, Node and Testing]
    • Added .spec.completionMode field to Job, with accepted values NonIndexed (default) and Indexed. This is an alpha field and is only honored by servers with the IndexedJob feature gate enabled. (kubernetes/kubernetes#98441, @​alculquicondor) [SIG Apps and CLI]
    • Adds support for endPort field in NetworkPolicy (kubernetes/kubernetes#97058, @​rikatz) [SIG Apps and Network]
    • CSIServiceAccountToken graduates to Beta and enabled by default. (kubernetes/kubernetes#99298, @​zshihang)
    • Cluster admins can now turn off /debug/pprof and /debug/flags/v endpoint in kubelet by setting enableProfilingHandler and enableDebugFlagsHandler to false in the Kubelet configuration file. Options enableProfilingHandler and enableDebugFlagsHandler can be set to true only when enableDebuggingHandlers is also set to true. (kubernetes/kubernetes#98458, @​SaranBalaji90)
    • DaemonSets accept a MaxSurge integer or percent on their rolling update strategy that will launch the updated pod on nodes and wait for those pods to go ready before marking the old out-of-date pods as deleted. This allows workloads to avoid downtime during upgrades when deployed using DaemonSets. This feature is alpha and is behind the DaemonSetUpdateSurge feature gate. (kubernetes/kubernetes#96441, @​smarterclayton) [SIG Apps and Testing]
    • Enable SPDY pings to keep connections alive, so that kubectl exec and kubectl portforward won't be interrupted. (kubernetes/kubernetes#97083, @​knight42) [SIG API Machinery and CLI]
    • FieldManager no longer owns fields that get reset before the object is persisted (e.g. "status wiping"). (kubernetes/kubernetes#99661, @​kevindelgado) [SIG API Machinery, Auth and Testing]
    • Fixes server-side apply for APIService resources. (kubernetes/kubernetes#98576, @​kevindelgado)
    • Generic ephemeral volumes are beta. (kubernetes/kubernetes#99643, @​pohly) [SIG API Machinery, Apps, Auth, CLI, Node, Storage and Testing]
    • Hugepages request values are limited to integer multiples of the page size. (kubernetes/kubernetes#98515, @​lala123912) [SIG Apps]
    • Implement the GetAvailableResources in the podresources API. (kubernetes/kubernetes#95734, @​fromanirh) [SIG Instrumentation, Node and Testing]
    • IngressClass resource can now reference a resource in a specific namespace for implementation-specific configuration (previously only Cluster-level resources were allowed). This feature can be enabled using the IngressClassNamespacedParams feature gate. (kubernetes/kubernetes#99275, @​hbagdi)
    • Jobs API has a new .spec.suspend field that can be used to suspend and resume Jobs. This is an alpha field which is only honored by servers with the SuspendJob feature gate enabled. (kubernetes/kubernetes#98727, @​adtac)
    • Kubelet Graceful Node Shutdown feature graduates to Beta and enabled by default. (kubernetes/kubernetes#99735, @​bobbypage)
    • Kubernetes is now built using go1.15.7 (kubernetes/kubernetes#98363, @​cpanato) [SIG Cloud Provider, Instrumentation, Node, Release and Testing]
    • Namespace API objects now have a kubernetes.io/metadata.name label matching their metadata.name field to allow selecting any namespace by its name using a label selector. (kubernetes/kubernetes#96968, @​jayunit100) [SIG API Machinery, Apps, Cloud Provider, Storage and Testing]
    • One new field "InternalTrafficPolicy" in Service is added. It specifies if the cluster internal traffic should be routed to all endpoints or node-local endpoints only. "Cluster" routes internal traffic to a Service to all endpoints. "Local" routes traffic to node-local endpoints only, and traffic is dropped if no node-local endpoints are ready. The default value is "Cluster". (kubernetes/kubernetes#96600, @​maplain) [SIG API Machinery, Apps and Network]
    • PodDisruptionBudget API objects can now contain conditions in status. (kubernetes/kubernetes#98127, @​mortent) [SIG API Machinery, Apps, Auth, CLI, Cloud Provider, Cluster Lifecycle and Instrumentation]
    • PodSecurityPolicy only stores "generic" as allowed volume type if the GenericEphemeralVolume feature gate is enabled (kubernetes/kubernetes#98918, @​pohly) [SIG Auth and Security]

    ... (truncated)

    Commits
    • f675832 Merge pull request #1655 from yliaog/update-21-base-2
    • e080f4c Update submodule to the same version as master branch
    • 6567414 Merge pull request #1653 from yliaog/automated-release-of-21.7.0-upstream-rel...
    • f565720 updated compatibility matrix and maintenance status
    • 359e3e3 generated client change
    • 2388c8a update version constants for 21.7.0 release
    • 375eb9b update changelog with release notes from master branch
    • 025c67f add comment
    • b215de5 test: WSClient.returncode idempotence
    • 85a71f2 generated python-base update
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    dependencies 
    opened by dependabot[bot] 0
  • Remove exact argument to read_namespaced_pod

    Remove exact argument to read_namespaced_pod

    This is causing memworld-mall deploys to fail as the exact argument is deprecated in newer versions of kubernetes.

    pipfile.lock specifies version ==20.13.0 for the kubernetes package but when testing the installation with pip it installs the latest version, 21.7.0. I'm guessing setup.py needs changing to make it more reliable but I've tested this change with both versions and it works fine so I think it's worth the change anyway

    opened by memriseed 0
Owner
Memrise
Learn a language. Meet the world.
Memrise
MagTape is a Policy-as-Code tool for Kubernetes that allows for evaluating Kubernetes resources against a set of defined policies to inform and enforce best practice configurations.

MagTape is a Policy-as-Code tool for Kubernetes that allows for evaluating Kubernetes resources against a set of defined policies to inform and enforce best practice configurations. MagTape includes variable policy enforcement, notifications, and targeted metrics.

T-Mobile 143 Dec 27, 2022
Google Kubernetes Engine (GKE) with a Snyk Kubernetes controller installed/configured for Snyk App

Google Kubernetes Engine (GKE) with a Snyk Kubernetes controller installed/configured for Snyk App This example provisions a Google Kubernetes Engine

Pas Apicella 2 Feb 9, 2022
Coding For Entrepreneurs 100 Jan 1, 2023
Run Oracle on Kubernetes with El Carro

El Carro is a new project that offers a way to run Oracle databases in Kubernetes as a portable, open source, community driven, no vendor lock-in container orchestration system. El Carro provides a powerful declarative API for comprehensive and consistent configuration and deployment as well as for real-time operations and monitoring.

Google Cloud Platform 205 Dec 30, 2022
This repository contains code examples and documentation for learning how applications can be developed with Kubernetes

BigBitBus KAT Components Click on the diagram to enlarge, or follow this link for detailed documentation Introduction Welcome to the BigBitBus Kuberne

null 51 Oct 16, 2022
sysctl/sysfs settings on a fly for Kubernetes Cluster. No restarts are required for clusters and nodes.

SysBindings Daemon Little toolkit for control the sysctl/sysfs bindings on Kubernetes Cluster on the fly and without unnecessary restarts of cluster o

Wallarm 19 May 6, 2022
Rancher Kubernetes API compatible with RKE, RKE2 and maybe others?

kctl Rancher Kubernetes API compatible with RKE, RKE2 and maybe others? Documentation is WIP. Quickstart pip install --upgrade kctl Usage from lazycls

null 1 Dec 2, 2021
Checkmk kube agent - Checkmk Kubernetes Cluster and Node Collectors

Checkmk Kubernetes Cluster and Node Collectors Checkmk cluster and node collecto

tribe29 GmbH 15 Dec 26, 2022
A basic instruction for Kubernetes setup and understanding.

A basic instruction for Kubernetes setup and understanding Module ID Module Guide - Install Kubernetes Cluster k8s-install 3 Docker Core Technology mo

null 648 Jan 2, 2023
A Blazing fast Security Auditing tool for Kubernetes

A Blazing fast Security Auditing tool for kubernetes!! Basic Overview Kubestriker performs numerous in depth checks on kubernetes infra to identify th

Vasant Chinnipilli 934 Jan 4, 2023
Official Python client library for kubernetes

Kubernetes Python Client Python client for the kubernetes API. Installation From source: git clone --recursive https://github.com/kubernetes-client/py

Kubernetes Clients 5.4k Jan 2, 2023
A Kubernetes operator that creates UptimeRobot monitors for your ingresses

This operator automatically creates uptime monitors at UptimeRobot for your Kubernetes Ingress resources. This allows you to easily integrate uptime monitoring of your services into your Kubernetes deployments.

Max 49 Dec 14, 2022
A Simple script to hunt unused Kubernetes resources.

K8SPurger A Simple script to hunt unused Kubernetes resources. Release History Release 0.3 Added Ingress Added Services Account Adding RoleBindding Re

Yogesh Kunjir 202 Nov 19, 2022
Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

Linux, Jenkins, AWS, SRE, Prometheus, Docker, Python, Ansible, Git, Kubernetes, Terraform, OpenStack, SQL, NoSQL, Azure, GCP, DNS, Elastic, Network, Virtualization. DevOps Interview Questions

Arie Bregman 35.1k Jan 2, 2023
Chartreuse: Automated Alembic migrations within kubernetes

Chartreuse: Automated Alembic SQL schema migrations within kubernetes "How to automate management of Alembic database schema migration at scale using

Wiremind 8 Oct 25, 2022
Caboto, the Kubernetes semantic analysis tool

Caboto Caboto, the Kubernetes semantic analysis toolkit. It contains a lightweight Python library for semantic analysis of plain Kubernetes manifests

Michael Schilonka 8 Nov 26, 2022
Hubble - Network, Service & Security Observability for Kubernetes using eBPF

Network, Service & Security Observability for Kubernetes What is Hubble? Getting Started Features Service Dependency Graph Metrics & Monitoring Flow V

Cilium 2.4k Jan 4, 2023
A charmed operator for running PGbouncer on kubernetes.

operator-template Description TODO: Describe your charm in a few paragraphs of Markdown Usage TODO: Provide high-level usage, such as required config

Canonical 1 Dec 1, 2022
Quick & dirty controller to schedule Kubernetes Jobs later (once)

K8s Jobber Operator Quickly implemented Kubernetes controller to enable scheduling of Jobs at a later time. Usage: To schedule a Job later, Set .spec.

Jukka Väisänen 2 Feb 11, 2022