Linode

Dealing with my preferred cloud provider.

LinodeClient

 LinodeClient (token)

A client instance that facilitates communication with the Linode API.

Firewall

We create a mechanism to control a firewall that is created for the Kubernetes cluster. Normally, it only allos web traffic but may allow other traffic depending on the needs of the cluster.

client = LinodeClient(os.getenv("LINODE_TOKEN"))
print(client.is_firewall_enabled)
client.enable_firewall()
print(client.is_firewall_enabled)
client.disable_firewall()
print(client.is_firewall_enabled)
True
True
False

enable_firewall

 enable_firewall ()

disable_firewall

 disable_firewall ()