Exemple #1
0
async def watch_resource(resource, **kwargs):
    # Consume and print the events as they stream in from the `resource`
    async for event in k8s.Watch(resource, **kwargs):
        print(f"{event.name} {event.obj.kind} {event.obj.metadata.name}")
async def watch_resource(cluster_name, resource, **kwargs):
    async for event in k8s.Watch(resource, **kwargs):
        print(f"{event.name} {event.obj.kind} {event.obj.metadata.name}")