2020-06-23

Note

caCert, err := ioutil.ReadFile("ca.crt")
if err != nil {
    panic(err)
}
certPool := x509.NewCertPool()
certPool.AppendCertsFromPEM(caCert)
tr := &http.Transport{
    TLSClientConfig: &tls.Config{
        RootCAs: certPool,
    },
}
client := &http.Client{
    Transport: tr,
}
d-kuro
d-kuro
Software Engineer

I’m a software engineer interested in Kubernetes and other cloud-native technologies.