2 ms·
The official python client does not have feature parity with kubectl; I had to reimplement parts of kubectl in my own scripts, like the 'apply' and 'exec' subco
by dharmab 3y ago
The official python client does not have feature parity with kubectl; I had to reimplement parts of kubectl in my own scripts, like the 'apply' and 'exec' subcommands and less-flaky CRD deployments.
- jacobtomlinson 3y agoKr8s already has things like port forwarding and I’m working on apply right now. Exec is next on my list
- dharmab 3y agohere, take my code: https://github.com/dharmab/homelab-k3s/blob/2f46393aeeb736736595ed830c259c7888a2a3e0/lab/main.py#L96 https://github.com/dharmab/homelab-k3s/blob/2f46393aeeb73673...
- jacobtomlinson 3y agoHeh thanks. We are trying to avoid binary dependencies like kubectl because you can’t install the with pip.
- dharmab 3y agothat exec function is pure python, and the order of operations in that deploy function is important (initial deployment of resource out of order will likely either fail outright or cause certain Pods to fail to become read)