Skip to content

Instantly share code, notes, and snippets.

@leeeboo
Created February 22, 2018 03:44
Show Gist options
  • Save leeeboo/abf83d811617d21bb5425737dd0df006 to your computer and use it in GitHub Desktop.
Save leeeboo/abf83d811617d21bb5425737dd0df006 to your computer and use it in GitHub Desktop.
cn-northwest-1 kops cluster config
apiVersion: kops/v1alpha2
kind: Cluster
metadata:
name: $集群名称.k8s.local
spec:
api:
loadBalancer:
type: Public
authorization:
rbac: {}
kubeAPIServer:
authorizationRbacSuperUser: admin
featureGates:
ServiceNodeExclusion: "true"
kubeControllerManager:
featureGates:
ServiceNodeExclusion: "true"
kubeScheduler:
featureGates:
ServiceNodeExclusion: "true"
kubelet:
podInfraContainerImage: leeeboo/pause-amd64:3.1
featureGates:
ServiceNodeExclusion: "true"
channel: stable
cloudProvider: aws
clusterDNSDomain: k8s.local
docker:
registryMirrors:
- https://registry.docker-cn.com
configBase: s3://$存储桶名/$集群名称.k8s.local
etcdClusters:
- etcdMembers:
- instanceGroup: master-cn-northwest-1a
name: a
- instanceGroup: master-cn-northwest-1b
name: b
- instanceGroup: master-cn-northwest-1a-2
name: a-2
enableEtcdTLS: true
name: main
image: leeeboo/etcd:3.2.14
version: 3.2.14
- etcdMembers:
- instanceGroup: master-cn-northwest-1a
name: a
- instanceGroup: master-cn-northwest-1b
name: b
- instanceGroup: master-cn-northwest-1a-2
name: a-2
enableEtcdTLS: true
name: events
image: leeeboo/etcd:3.2.14
version: 3.2.14
iam:
allowContainerRegistry: true
legacy: false
kubernetesApiAccess:
- 0.0.0.0/0
kubernetesVersion: https://s3.cn-northwest-1.amazonaws.com.cn/$存储通名/kubernetes/release/v1.9.2
masterPublicName: api.k8s.local
networkCIDR: 10.100.0.0/16
networkID: $你的VPCID
networking:
weave:
mtu: 8912
nonMasqueradeCIDR: 100.64.0.0/10
sshAccess:
- 0.0.0.0/0
subnets:
- id: $私有子网ID
cidr: 10.100.1.0/24
name: cn-northwest-1a
type: Private
zone: cn-northwest-1a
- id: $私有子网ID
cidr: 10.100.101.0/24
name: cn-northwest-1b
type: Private
zone: cn-northwest-1b
- id: $公有子网ID
cidr: 10.100.0.0/24
name: utility-cn-northwest-1a
type: Utility
zone: cn-northwest-1a
- id: $公有子网ID
cidr: 10.100.100.0/24
name: utility-cn-northwest-1b
type: Utility
zone: cn-northwest-1b
topology:
dns:
type: Public
masters: private
nodes: private
---
apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
labels:
kops.k8s.io/cluster: $集群名称.k8s.local
name: master-cn-northwest-1a
spec:
associatePublicIp: false
image: ami-7f0d191d
machineType: t2.medium
maxSize: 1
minSize: 1
nodeLabels:
kops.k8s.io/instancegroup: master-cn-northwest-1a
role: Master
subnets:
- cn-northwest-1a
---
apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
labels:
kops.k8s.io/cluster: $集群名称.k8s.local
name: master-cn-northwest-1b
spec:
associatePublicIp: false
image: ami-7f0d191d
machineType: t2.medium
maxSize: 1
minSize: 1
nodeLabels:
kops.k8s.io/instancegroup: master-cn-northwest-1b
role: Master
subnets:
- cn-northwest-1b
---
apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
labels:
kops.k8s.io/cluster: $集群名称.k8s.local
name: master-cn-northwest-1a-2
spec:
associatePublicIp: false
image: ami-7f0d191d
machineType: t2.medium
maxSize: 1
minSize: 1
nodeLabels:
kops.k8s.io/instancegroup: master-cn-northwest-1a-2
role: Master
subnets:
- cn-northwest-1a
---
apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
labels:
kops.k8s.io/cluster: $集群名称.k8s.local
name: nodes-cn-northwest-1a
spec:
associatePublicIp: false
image: ami-7f0d191d
machineType: t2.medium
maxSize: 1
minSize: 1
nodeLabels:
kops.k8s.io/instancegroup: nodes-cn-northwest-1a
alpha.service-controller.kubernetes.io/exclude-balancer: ""
role: Node
subnets:
- cn-northwest-1a
---
apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
labels:
kops.k8s.io/cluster: $集群名称.k8s.local
name: nodes-cn-northwest-1b
spec:
associatePublicIp: false
image: ami-7f0d191d
machineType: t2.medium
maxSize: 1
minSize: 1
nodeLabels:
kops.k8s.io/instancegroup: nodes-cn-northwest-1b
role: Node
subnets:
- cn-northwest-1b
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment