Why Nostr? What is Njump?
2023-03-29 09:01:44

dpc on Nostr: Investigating how to make k8s do stuff without touching any smelly Yaml file, or even ...

Investigating how to make k8s do stuff without touching any smelly Yaml file, or even worse so - stinky helm templates or other terrible mechanisms like it.

```
writeYaml = name: content: pkgs.writeText name (builtins.toJSON content);
in
{
packages = {
pod = writeYaml "pod.yaml" {
apiVersion = "v1";
kind = "Pod";
metadata = {
name = "nginx";
};
spec = {
containers = [
{
name = "nginx";
image = "nginx:latest";
ports = [
{
containerPort = 80;
}
];
}
];
};
};
};
```

And then:

```
> nix build -L .#pod && cat result | kc apply -f -
pod/nginx created
```
Author Public Key
npub1yarprdrj3vxyp0su7xqd3u6z047na6792ezas6dqqt5tv4lce4ssjt0gd0