I am creating a kubernetes cluster in AWS
with kops
.
I understand that I can change the nodes' instance type using following command.
kops edit ig nodes --name ${NAME}
It will open this file and I can edit config
apiVersion: kops/v1alpha2
kind: InstanceGroup
metadata:
creationTimestamp: 2018-12-07T11:09:37Z
labels:
kops.k8s.io/cluster: <cluster-name>.k8s.local
name: nodes
spec:
image: kope.io/k8s-1.10-debian-jessie-amd64-hvm-ebs-2018-08-17
machineType: t2.large
maxSize: 5
minSize: 3
nodeLabels:
kops.k8s.io/instancegroup: nodes
role: Node
subnets:
- eu-west-2a
- eu-west-2b
- eu-west-2c
What if I want to create one node with xlarge
type and two another in large
type. I don't see any option to set these type of value.
The reason for this is, in my current infrastructure, the DB is residing in a 2xlarge instance and all other small componentes are in large instance. So I want nodes to be as big a possible. Another solution is instead of three I create only two 2xlarge nodes and let kuberentes manage the deployment.
Create new instance group Then, preview and last apply the changes.
Create: $ kops create ig <new-instace-group-name> --state <your-s3-bucket-name>
Preview: $ kops update cluster --name <cluster-name> --state="<your-s3-bucket-name>"
Apply: $ kops update cluster --name <cluster-name> --state="<your-s3-bucket-name>" --yes