This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# KOPS Validate Cluster Success | |
kops validate cluster | |
[root@ip-172-31-41-51 ec2-user]# kops validate cluster | |
Using cluster from kubectl context: k8s-gitlab.k8s.local | |
Validating cluster k8s-gitlab.k8s.local | |
INSTANCE GROUPS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# KOPS Validate Cluster Error | |
kops validate cluster | |
------------------------------------ | |
# Result | |
[root@ec2-user]# kops validate cluster | |
Using cluster from kubectl context: k8s-gitlab.k8s.local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Apply KOPS Configuration and Deploy your Cluster | |
kops update cluster ${NAME} --yes | |
I0408 11:40:22.496308 26686 apply_cluster.go:556] Gossip DNS: skipping DNS validation | |
I0408 11:40:22.868197 26686 executor.go:103] Tasks: 0 done / 96 total; 44 can run | |
I0408 11:40:24.467352 26686 vfs_castore.go:729] Issuing new certificate: "apiserver-aggregator-ca" | |
I0408 11:40:24.603492 26686 vfs_castore.go:729] Issuing new certificate: "etcd-manager-ca-events" | |
I0408 11:40:24.722944 26686 vfs_castore.go:729] Issuing new certificate: "ca" | |
I0408 11:40:25.039968 26686 vfs_castore.go:729] Issuing new certificate: "etcd-manager-ca-main" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get KOPS Configuration | |
kops get ig --name ${NAME} | |
------------------------------- | |
# Result | |
[root@ip-172-31-41-51 ec2-user]# kops get ig --name ${NAME} | |
NAME ROLE MACHINETYPE MIN MAX ZONES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit KOPS Worker Nodes Configuration | |
kops edit ig nodes --name ${NAME} | |
--------------------------------------------- | |
# Result | |
apiVersion: kops.k8s.io/v1alpha2 | |
kind: InstanceGroup |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Edit KOPS Master Node Configuration | |
kops edit cluster ${NAME} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Generate a ssh key for KOPS | |
ssh-keygen -b 2048 -t rsa -f ~/.ssh/id_rsa | |
kops create secret --name ${NAME} sshpublickey admin -i ~/.ssh/id_rsa.pub |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Create KOPS Cluster Configuration | |
kops create cluster --zones us-east-1a,us-east-1b,us-east-1c ${NAME} | |
------------------------------------------------------------------------------ | |
# Result | |
[root@ec2-user] kops create cluster --zones us-east-1a,us-east-1b,us-east-1c ${NAME} | |
I0408 11:25:53.884925 26564 create_cluster.go:562] Inferred --cloud=aws from zone "us-east-1a" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Set Environment Variables for KOPS | |
export NAME=YourClusterName.k8s.local | |
export KOPS_STATE_STORE=s3://YourS3BucketName |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Install KOPS | |
curl -Lo kops https://github.com/kubernetes/kops/releases/download/$(curl -s https://api.github.com/repos/kubernetes/kops/releases/latest | grep tag_name | cut -d '"' -f 4)/kops-linux-amd64 | |
chmod +x ./kops | |
sudo mv ./kops /usr/local/bin/ |