操作kubernets(k8s)的增删改查
作者:互联网
资源的CRUD:
创建: Service service = client.services().inNamespace(namespace).create(service); 更新: Namespace namespace = client.namespaces().withName(name).get(); //update resources client.namespaces().createOrReplace(namespace); 查询: ServiceList services = client.services().inNamespace("default").list(); Service service = client.services().inNamespace("default").withName("myservice").get() 删除: client.services().inNamespace("default").withName("myservice").delete();
参考链接:https://blog.csdn.net/zzq900503/article/details/88352902
标签:service,default,namespace,kubernets,改查,inNamespace,client,services,k8s 来源: https://www.cnblogs.com/mangwusuozhi/p/16593762.html