Difference between revisions of "Template:GRPC liveness probe example"

From wikieduonline
Jump to navigation Jump to search
(Created page with "<pre> apiVersion: v1 kind: Pod metadata: name: etcd-with-grpc spec: containers: - name: etcd image: registry.k8s.io/etcd:3.5.1-0 command: [ "/usr/local/bin/etcd"...")
 
 
(One intermediate revision by the same user not shown)
Line 1: Line 1:
<pre>
+
apiVersion: v1
apiVersion: v1
+
[[kind: Pod]]
kind: Pod
+
metadata:
metadata:
+
  name: etcd-with-grpc
  name: etcd-with-grpc
+
spec:
spec:
+
  containers:
  containers:
+
  - name: etcd
  - name: etcd
+
    image: registry.k8s.io/etcd:3.5.1-0
    image: registry.k8s.io/etcd:3.5.1-0
+
    command: [ "/usr/local/bin/etcd", "--data-dir",  "/var/lib/etcd", "--listen-client-urls", "http://0.0.0.0:2379", "--advertise-client-urls", "http://127.0.0.1:2379", "--log-level", "debug"]
    command: [ "/usr/local/bin/etcd", "--data-dir",  "/var/lib/etcd", "--listen-client-urls", "http://0.0.0.0:2379", "--advertise-client-urls", "http://127.0.0.1:2379", "--log-level", "debug"]
+
    ports:
    ports:
+
    - containerPort: 2379
    - containerPort: 2379
+
    [[livenessProbe]]:
    livenessProbe:
+
      grpc:
      grpc:
+
        port: 2379
        port: 2379
+
      initialDelaySeconds: 10
      initialDelaySeconds: 10
 
 
 
</pre>
 

Latest revision as of 10:35, 22 October 2024

apiVersion: v1
kind: Pod
metadata:
  name: etcd-with-grpc
spec:
  containers:
  - name: etcd
    image: registry.k8s.io/etcd:3.5.1-0
    command: [ "/usr/local/bin/etcd", "--data-dir",  "/var/lib/etcd", "--listen-client-urls", "http://0.0.0.0:2379", "--advertise-client-urls", "http://127.0.0.1:2379", "--log-level", "debug"]
    ports:
    - containerPort: 2379
    livenessProbe:
      grpc:
        port: 2379
      initialDelaySeconds: 10

Advertising: