kind: ReplicationController
apiVersion: v1
metadata:
  name: ksh-rc
spec:
  replicas: 3
  selector:
    app: ksh
  template:
    metadata:
      labels:
        app: ksh
    spec:
      containers:
      - name: klog-cnt
        image: cn007b/ubuntu
        lifecycle:
          postStart:
            exec:
              command: [
                "/bin/sh",
                "-c",
                "curl -i -XPOST 'https://realtimelog.herokuapp.com:443/rkc8q6llprn' -H 'Content-Type: application/json' -d '{\"status\": \"rc pod postStart\"}'",
              ]
          preStop:
            exec:
              command: [
                "/bin/sh",
                "-c",
                "curl -i -XPOST 'https://realtimelog.herokuapp.com:443/rkc8q6llprn' -H 'Content-Type: application/json' -d '{\"status\": \"rc pod preStop\"}'",
              ]
        command: [
          'sh',
          '-c',
          "while true; do curl -i -XPOST 'https://realtimelog.herokuapp.com:443/rkc8q6llprn' -H 'Content-Type: application/json' -d '{\"code\":\"100\", \"status\": \"ok from rc\"}'; sleep 5; done",
        ]
