Kubernetes Installation with Vagrant & CoreOS
Vagrant和CoreOS部署多节点k8s集群.
-
git
-
Vagrant
-
kubectl
# chef-server | |
https://www.digitalocean.com/community/tutorial_series/getting-started-managing-your-infrastructure-using-chef | |
# knife cookbook | |
## prism cookbook | |
## third party cookbooks | |
# chef workflow | |
## bootstrap a node | |
## attribute role/env/default/overrite |
func main() { | |
ctx := context.Background() | |
// trap Ctrl+C and call cancel on the context | |
ctx, cancel := context.WithCancel(ctx) | |
c := make(chan os.Signal, 1) | |
signal.Notify(c, os.Interrupt) | |
defer func() { | |
signal.Stop(c) |
--- | |
apiVersion: extensions/v1beta1 | |
kind: Deployment | |
metadata: | |
labels: | |
name: prometheus-deployment | |
name: prometheus | |
spec: | |
replicas: 1 | |
template: |
apiVersion: v1 | |
kind: Service | |
metadata: | |
name: zk-headless | |
labels: | |
app: zk-headless | |
spec: | |
ports: | |
- port: 2888 | |
name: server |
If you are receiving an error that the private doesn't match the certificate or that a certificate that you installed to a site is not trusted, try one of these commands. If you are trying to verify that an SSL certificate is installed correctly, be sure to check out the SSL Checker. | |
Check an MD5 hash of the public key to ensure that it matches with what is in a CSR or private key | |
` | |
openssl x509 -noout -modulus -in certificate.crt | openssl md5 | |
openssl rsa -noout -modulus -in privateKey.key | openssl md5 | |
openssl req -noout -modulus -in CSR.csr | openssl md5 | |
` | |
Check an SSL connection. All the certificates (including Intermediates) should be displayed | |
openssl s_client -connect www.paypal.com:443 |
# Pod Hand-on | |
## Two-Container Pod | |
创建一个运行两个container的pod | |
``` | |
kubectl create -f https://raw.githubusercontent.com/jianchen2580/k8s-example/master/pod/two-container-pod.yaml | |
``` | |
查看Pod信息: |