Kubernetes command

서재환·2023년 1월 17일
0

kubernetes

목록 보기
2/2

Kubernetes Master Node에 Worker Node 연결하기

  • kubeadm token create
  • sudo kubeadm join masternodeIpAddress::port --token 'token-number' --discovery-token-ca-cert-hash 'hash-number'

kubeadm join

join a new node to an existing cluster

masternodeIpAddress::port

IP address and port of the Kubernetes control plane.

-token

flag is used to specify the token that is used to authenticate the join request. The token value should be provided by the cluster administrator

--discovery-token-ca-cert-hash

CA certificate used to secure the Kubernetes API server

CA

CA (Certificate Authority) certificate is used to secure the communication between the Kubernetes API server and the nodes in the cluster. The hash of the CA certificate is a unique identifier that represents the certificate. It is calculated by applying a hash function to the contents of the certificate. The hash is used to verify the authenticity of the certificate.

kubectl apply -k server-name

The command kubectl apply -k server-name is used to apply a kustomization to a Kubernetes cluster. The -k flag specifies the location of a kustomization file, in this case, the file is located in a directory called "server-name". The kustomization file contains a list of resources to be applied to the cluster, such as ConfigMap, Deployment, Service, and Ingress. The apply command creates or updates resources in the cluster to match the desired state defined in the kustomization file.

kubectl -n dev rollout restart deplyments/insurparts-backend

The command "kubectl -n dev rollout restart deployments/insurparts-backend" is used to restart a deployment in the "dev" namespace named "insurparts-backend". The "rollout restart" command is used to restart the pods of a deployment. This can be useful for a variety of reasons, such as updating the application or resolving issues with the application. By restarting the pods, the new changes or fixes will be applied to the running instances of the application.

0개의 댓글