본문 바로가기

반응형

IT/golang

(9)
[kubernetes] helm 설치하기 # k3s 단일노드 환경에서 잘설치 됨! curl https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 > get_helm.sh chmod 700 get_helm.sh ./get_helm.sh ## 설치확인 helm version Helm 3 설치 & 기본 사용방법 - 호롤리한 하루 (gruuuuu.github.io)' # 리포지터리 추가/업데이트/검색 helm repo add bitnami https://charts.bitnami.com/bitnami helm repo update helm search repo bitnami # 쿠버네티스 대시보드 설치 export KUBECONFIG=/etc/rancher/k3s/k3s.yaml ..
[kubernates] k3s 설치하기 == 추가 :: 단일PC에 설치하기 k3s 시리즈 - 간단하게 Kubernetes 환경 구축하기 | si.mpli.st k3s 시리즈 - 간단하게 Kubernetes 환경 구축하기 조금 더 쉽게 Kubernetes를 운영하는 방법은 없을까요? k3s를 이용하여 조금 더 쉽게 Kubernetes를 설치하고, 첫 서비스를 띄워봅니다. si.mpli.st ## 준비 sudo apt update sudo apt upgrade ## 핵심 curl -sfL https://get.k3s.io | sh - ## 확인 sudo systemctl status k3s 설치환경 : Ubuntu 20.04.6 LTS ++ 추가 일반사용자가 쓸수있게 추가 실행 sudo chmod 644 /etc/rancher/k3s/k3s.ya..
VirtualBox 네트워크 설정하기! Virtual Box 네트워크 설정 정리 : 네이버 블로그 (naver.com) Virtual Box 네트워크 설정 정리 [목차] 1. 들어가며 2. 기본 용어 정리 3. 네트워크 방식 설명 4. 참고 [들어가며] 버추얼박스로 취약 서버... blog.naver.com 매우매우 도움되는 정보! 찾아본 이유는 , 로컬 호스트에 여러대의 가상환경을 구성후 서로 통신하게 하기 위한 방법 이었고, 답은 NAT 네트워크를 구성해야 한다는 것!
폰북 예제 - 2 package main import ( "encoding/csv" "fmt" "os" ) type Record struct { Name string Surname string Number string LastAccess string } var myData = []Record{} func readCSVFile(filepath string) ([][]string, error) { //파일 위치 정상확인 _, err := os.Stat(filepath) if err != nil { return nil, err } f, err := os.Open(filepath) if err != nil { return nil, err } //닫을껄 미리 선언한다. defer f.Close() lines, err := csv...
Go! 상수값 선언 과 iota package main import "fmt" type Digit int type Power2 int const PI = 3.1415926 // 상수 여러개 선언 const ( C1 = "C1C1C1" C2 = "C2C2C2" C3 = "C3C3C3" ) func main() { //상수선언 iota 를 쓴다 const ( Zero Digit = iota One Two Three Four ) //찍었을때 값 fmt.Println("Zero:", Zero) fmt.Println("One:", One) //SKip 은 _ 이용 const ( p2_0 Power2 = 1
Go! 폰북 예제 책에 나와있는 간단한 예제 구조체를 리스트형으로 선언하고, 하드코딩으로 넣어둔 데이터를 전체를 보여주거나, 키를 넣어서 찾을수 있는 프로그램 package main import ( "fmt" "os" "path" ) type Entry struct { Name string Surname string Tel string } var data = []Entry{} func search(key string) *Entry { for i, v := range data { if v.Surname == key { return &data[i] } } return nil } func list(){ for _, v := range data { fmt.Println(v) } } func main(){ arguments := ..
Go! 언어 시작 2023년의 언어로 Go 를 정했다. 쓸모는 나중에 생각하고 일단 시작한다. 설치! https://go.dev/dl/ Downloads - The Go Programming Language Downloads After downloading a binary release suitable for your system, please follow the installation instructions. If you are building from source, follow the source installation instructions. See the release history for more information about Go releases go.dev 그냥 한다! 쉽다! 기본 헬로우 월드! packag..
tinygo 셋팅하기 아두이노나 마이크로비트에서 go 를 쓰기위해서 윈도우에 tinygo 환경을 셋팅해보겠습니다. 1. 설치 scoop 를 이용하는게 가장 편합니다. scoop 설치! https://scoop.sh/ https://scoop.sh/ scoop.sh 윈도우 파워셀에서 > Set-ExecutionPolicy RemoteSigned -Scope CurrentUser # Optional: Needed to run a remote script the first time > irm get.scoop.sh | iex 끄읏 go 와 tiny go 를 설치 합니다. https://tinygo.org/getting-started/install/windows/ Windows Windows install guide tinygo.o..

반응형