基于centos最新镜像构建的libfaketime镜像tar包在:https://pan.baidu.com/s/1ZoIk0II7iXWf5zv1WYi5-A
提取码:bxht
基于该进行构建的rs文件如下:

apiVersion: apps/v1
kind: ReplicaSet
metadata:
  name: libfaketime
spec:
  replicas: 1
  selector:
    matchLabels:
      app: faketime
  template:
    metadata:
      labels:
        app: faketime
    spec:
      containers:
      - name: faketime
        image: libfaketime
        imagePullPolicy: IfNotPresent
        command: ["/bin/bash"]
        args: ["-c","FAKETIME=\"@2000-01-01 11:12:13\"    /bin/bash -c \'while true ; do date; sleep 1; done\'"]
        env:
        - name: LD_PRELOAD
          value: "/usr/local/lib/faketime/libfaketime.so.1"
        - name: FAKETIME_DONT_RESET
          value: "1"

通过如下文件创建rs:

kubectl create -f centos-rc.yaml 

通过命令查看rs创建情况:

kubectl get rs

通过命令查看pod:

kubectl get pod 

查看pod日志:

 kubectl logs -f podname

发表评论

电子邮件地址不会被公开。