# 创建Pod[root@master pod]# kubectl apply -f pod-base.yaml
pod/pod-base created
# 查看Pod状况# READY 1/2 : 表示当前Pod中有2个容器,其中1个准备就绪,1个未就绪# RESTARTS : 重启次数,因为有1个容器故障了,Pod一直在重启试图恢复它[root@master pod]# kubectl get pod -n dev
NAME READY STATUS RESTARTS AGE
pod-base 1/2 Running 4 95s
# 可以通过describe查看内部的详情# 此时已经运行起来了一个基本的Pod,虽然它暂时有问题[root@master pod]# kubectl describe pod pod-base -n dev
镜像拉取
创建pod-imagepullpolicy.yaml文件,内容如下:
apiVersion: v1
kind: Pod
metadata:name: pod-imagepullpolicy
namespace: dev
spec:containers:-name: nginx
image: nginx:1.17.1
imagePullPolicy: Always # 用于设置镜像拉取策略-name: busybox
image: busybox:1.30
# 创建Pod[root@master pod]# kubectl create -f pod-imagepullpolicy.yaml
pod/pod-imagepullpolicy created
# 查看Pod详情# 此时明显可以看到nginx镜像有一步Pulling image "nginx:1.17.1"的过程[root@master pod]# kubectl describe pod pod-imagepullpolicy -n dev......
Events:
Type Reason Age From Message
-------------------------
Normal Scheduled default-scheduler Successfully assigned dev/pod-imagePullPolicy to node1
Normal Pulling 32s kubelet, node1 Pulling image "nginx:1.17.1"
Normal Pulled 26s kubelet, node1 Successfully pulled image "nginx:1.17.1"
Normal Created 26s kubelet, node1 Created container nginx
Normal Started 25s kubelet, node1 Started container nginx
Normal Pulled 7s (x3 over 25s) kubelet, node1 Container image "busybox:1.30" already present on machine
Normal Created 7s (x3 over 25s) kubelet, node1 Created container busybox
Normal Started 7s (x3 over 25s) kubelet, node1 Started container busybox
Android中的Toast是一种简易的消息提示框,toast提示框不能被用户点击,toast会根据用户设置的显示时间后自动消失。
创建Toast
两个方法创建Toast
makeText(Context context, int resId, int duration)
参数:context是toast显示在
angular.identiy 描述: 返回它第一参数的函数. 此函数多用于函数是编程. 使用方法: angular.identity(value); 参数详解: Param Type Details value
*
to be returned. 返回值: 传入的value 实例代码:
<!DOCTYPE HTML>
Hierarchical Queries
If a table contains hierarchical data, then you can select rows in a hierarchical order using the hierarchical query clause:
hierarchical_query_clause::=
start with condi
初次接触到socket网络编程,也参考了网络上众前辈的文章。尝试自己也写了一下,记录下过程吧:
服务端:(接收客户端消息并把它们打印出来)
public class SocketServer {
private List<Socket> socketList = new ArrayList<Socket>();
public s