KOPS?? you read it right! Kops with Gossip DNS
So I want to apologies for posting this late. Anyways without any delay let's get started.
What is KOPS ?
let me borrow this line from the official definition,
"it's the kubectl of K8s clusters"
I like this line very much coz it's the simplest form that can make you understand what is KOps.
Use Case of KOps
Suppose you wanted to create a self managed cluster but don't want to use the kubeadm and managed the infrastructure etc.
KOps is the answer to all of those queries.
It creates the Production grade Cluster to use for Development/Testing or just fun
To create Cluster you need 2 Things
Cloud Account (AWS ,GCP ,Azure etc).
A DNS/hostname/website anything you wanna call it.
But most of us don't want to buy or own a website name neither we want to buy a domain name so what can we do to solve this
Gossip DNS comes into play.
you can choose anyname but it must end with '.k8s.local' and you're ready to go.
Lets talk about Cloud Account
So here we need the admin access coz we need to create user and give it the permission, you can check the permission from the official doc here.
You also need a S3 bucket, so that KOps can save the cluster configuration on the cloud so that even other member of your team can use the same configuration to create their own cluster.
"NOTE: Bucket Versioning need to be enable & Bucket should be in us-east-1 other wise you need to do some more steps"
and you're done just run
kops create cluster --state <your-bucket-name> --name <name-of-your-cluster>
you can set these flag into env for easier use
After running the command it will show you the config file in which everything is mention
You just need to run the same command with --yes
kops create cluster --state <your-bucket-name> --name <name-of-your-cluster> --yes
Saying it will create production grade cluster is a little bit off from my point of view but there are 2-3 things you need to do before you can hand it over to someone like
Setting up metric server in K8s
Setting the config file expiry date longer
Installing the CNI
NOTE: Its better to specify the CNI in the starting, when we are creating the config file for our cluster
Otherwise it's a mess to configure the CNI coz it need to match the CIDR of k8s, for me I have to delete the cluster and create it again coz I didn't have anything critical over there.
So choose it first
You can check the about CNI and metric server if you just google it with KOps as keyword you can get everything.
And Thanks For Reading the long Article guys
You can checkout all the command flag from the official docs
I have made this for article for the GOSSIP DNS mostly coz I wasn't able to find any article about it.
Read every bit of the article coz it helps to setup everything and feel free to ask any question or error I'll try my best to solve them.
Top comments (2)
Nice article!
Thank you