class RemoteControl: def __init__(self): self.commands = [] def add_command(self, command): self.commands.append(command) def execute_commands(self): for command in self.commands: command.execute() 4、定义 Receiver 类: class Light: def turn_on(self): print("The light is on") def...
# 初始化Master(注意ip地址和主机hostname) kubeadm init \ --apiserver-advertise-address=172.31.0.2 \ --control-plane-endpoint=k8s-master \ --image-repository /lfy_k8s_images \ --kubernetes-version v1.20.9 \ --service-cidr=10.96.0.0/16 \ --pod-network-cidr=192.168.0.0/16 1. 2. 3. 4....