8 Şubat 2021 Pazartesi

Kubernetes Pod File

Örnek
Şöyle yaparız
apiVersion: v1
kind: Pod                                            # 1
metadata:
  name: sa-frontend                                  # 2
spec:                                                # 3
  containers:
    - image: rinormaloku/sentiment-analysis-frontend # 4
      name: sa-frontend                              # 5
      ports:
        - containerPort: 80                          # 6
Açıklaması şöyle
1. Kind: specifies the kind of the Kubernetes Resource that we want to create. In our case, a Pod.
2. Name: defines the name for the resource. We named it sa-frontend.
3. Spec is the object that defines the desired state for the resource. The most important property of a Pods Spec is the Array of containers.
4. Image is the container image we want to start in this pod.
5. Name is the unique name for a container in a pod.
6. Container Port:is the port at which the container is listening. This is just an indicator for the reader (dropping the port doesn’t restrict access).

Hiç yorum yok:

Yorum Gönder