본문 바로가기

728x90

리눅스

[kubernetes] kubectl config 명령 - 1 쿠버네티스 kubectl config 명령 Modify kubeconfig files using subcommands like "kubectl config set current-context my-context" 사용법 The loading order follows these rules: 1. If the --kubeconfig flag is set, then only that file is loaded. The flag may only be set once and no merging takes place. 2. If $KUBECONFIG environment variable is set, then it is used as a list of paths (normal path delimiting rules.. 더보기
[draft] Kubernetes Helm 패키지 관리자 Kubernetes Helm 패키지 관리자Helm은 Kubernetes의 패키지 관리자로 애플리케이션을 배포하고 관리하는 데 유용한 도구입니다. Helm을 사용하면 애플리케이션과 관련된 모든 Kubernetes 리소스를 패키지화하여 배포하고 버전 관리를 하며 재사용할 수 있습니다.Helm 패키지 설치Helm 스크립트 설치curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3chmod 700 get_helm.sh./get_helm.sh(또는) Helm 바이너리 다운로드curl -fsSL -o helm.tar.gz https://get.helm.sh/helm-v3.7.2-linux-amd64.ta.. 더보기
[kubernetes] 커든 및 드레인 커든 및 드레인 커든(cordon) kubectl get nodes $ kubectl get nodes NAME STATUS ROLES AGE VERSION ip-192-168-27-248.ap-northeast-2.compute.internal Ready 17h v1.22.12-eks-ba74326 ip-192-168-42-8.ap-northeast-2.compute.internal Ready 17h v1.22.12-eks-ba74326 ip-192-168-67-156.ap-northeast-2.compute.internal Ready 17h v1.22.12-eks-ba74326 kubectl cordon ip-192-168-67-156.ap-northeast-2.compute.internal $ ku.. 더보기
[kubernetes] 애플리케이션 배포 전략 애플리케이션 배포 전략 Recreate Rolling-Update(Ramped) Blue/Green Canary A/B testing Shadow kubectl explain deploy.spec.strategy $ kubectl explain deploy.spec.strategy KIND: Deployment VERSION: apps/v1 RESOURCE: strategy DESCRIPTION: The deployment strategy to use to replace existing pods with new ones. DeploymentStrategy describes how to replace existing pods with new ones. FIELDS: rollingUpdate Rolling .. 더보기
[kubernetes] kubectl create configmap 명령 kubectl create configmap 명령 Create a config map based on a file, directory, or specified literal value. 사용법 Examples: # Create a new config map named my-config based on folder bar kubectl create configmap my-config --from-file=path/to/bar # Create a new config map named my-config with specified keys instead of file basenames on disk kubectl create configmap my-config --from-file=key1=/path/to/ba.. 더보기
[kubernetes] kubectl create secret 명령 kubectl create secret 명령 Create a secret using specified subcommand. 사용법 Usage: kubectl create secret [flags] [options] Use "kubectl --help" for more information about a given command. Use "kubectl options" for a list of global command-line options (applies to all commands). yaml secret 생성 username 및 password base64로 인코딩 $ echo iacadmin | base64 aWFjYWRtaW4K $ echo MeH8KNZr71 | base64 TWVIOEtOWn.. 더보기
[kubernetes] kubectl run 명령 kubectl run 명령 Create and run a particular image in a pod. 사용법 Examples: # Start a nginx pod kubectl run nginx --image=nginx # Start a hazelcast pod and let the container expose port 5701 kubectl run hazelcast --image=hazelcast/hazelcast --port=5701 # Start a hazelcast pod and set environment variables "DNS_DOMAIN=cluster" and "POD_NAMESPACE=default" in the container kubectl run hazelcast --imag.. 더보기
[kubernetes] kubectl port-forward 명령 kubectl port-forward 명령 Forward one or more local ports to a pod. 사용법 Examples: # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in the pod kubectl port-forward pod/mypod 5000 6000 # Listen on ports 5000 and 6000 locally, forwarding data to/from ports 5000 and 6000 in a pod selected by the deployment kubectl port-forward deployment/mydeployment 5000 6000 # Lis.. 더보기

728x90