Welcome to market talks. I'm Ray head of markets at coin telegraph and in today's show We'll be discussing the latest events that are shaping the markets and it's been quite a week a rough week at that a True black swan event many would say First we would like to you know, it's kind of extend our condolences to anyone who lost money on FTX We know that things looked buttoned up there and a ton of traders had significant sums of money there So we're sorry that you all are going through this the volatility is Quite unpleasant. Everyone's seeing their portfolios Just kind of ebb away even further Hopefully this issue gets resolved and everyone gets their money or some of their money back But before we get into today's show We've got a recap of the weekly events related to FTX Alameda and Binance. So let's have a quick look Revealing Alameda research is a balance sheet holding a lot of FTX's FTT token CEO of Alameda said that what you see on these leaked balance sheet is not all of our assets CZ posted a tweet where he was saying that they were getting greed of this bunch of FTT token But there was clearly something going on with the books at FTX and Alameda Analysts were also able to track FTX wallets and Alameda wallets fear Basically appeared to kind of translate into a bank run on all assets held on FTX exchange Investors are surprised and that's reflecting in the price action today That raised a lot of questions in the mind of investors and probably the C's in the space All right, so How are you doing Marcel? Welcome Hey, Ray. Thanks for having me I hope your portfolio is doing all right Marcel and I work together daily. He's an analyst at a coin telegraph in the markets department He writes all of our content related to derivatives markets futures options, you know that sort of stuff For cryptocurrency and altcoins. So he's our go-to guy when it comes to kind of Looking at the markets from a different angle than technical analysis and fundamental analysis to Kind of see how professional traders are positioning What's their sentiment and how does that impact price action within the market? So for the past month Many analysts in the space have been pointing out that bitcoin's You know volatility was at a record low and many of them speculated that a price breakout would occur Determining the direction of this price breakout. It's pretty much impossible But one thing that is for sure is that we got that big move this week And who would have known that it would have been a major exchange and solvency that triggered this long-awaited spike and volatility So what Marcel and I are going to do today is kind of break down What happened with ftx? Look at how it's impacting the market and more importantly kind of explore some theories on how crypto prices Could react in the short and long term. So We've all recently heard of alameda research at the start of you know, this the last bull market It was a common name thrown around three arrows capital alameda research There's a few others that we know of the names escape me at the moment like kyle samani is that one of them Um, but what do they actually do? What is a prop shop? What is their purpose? Um, what do you know about alameda research and how crypto arbitrage desks actually work? Okay, right. So first of all, I want viewers to stay calm During this period.  I remember okx exchange a couple of years ago The ceo went missing for 15 days and we couldn't withdraw. I had sizable money deposited there What I did was I converted all my positions to bitcoin So the first day that they would allow withdrawals I could remove the bitcoins from the exchange and that's what I did but I did not panic because not knowing information is what make Traders go crazy and is what drives bitcoin prices to $15,000 When there's uncertainty traders tend to panic and do terrible things. So avoid over trading Leave your position there. Don't do nothing. Don't sell your ftx position for 10 percent of 5 percent of what's deposited there Wait 30 days wait 60 days Your life's not going to change for that talk to friends Talk on twitter. We're going to find out people willing to talk to you that that have been True to the same experience. So don't do anything desperate. That's what I ask you and as for your question rate Alameda research is a trading firm spearheaded by some backman fry Which happens to also own the ftx exchange But alameda research the property trading firm existed two years before ftx and it was a proctor business in fact Sam spf himself is a former trader of another proprietary trading firm jane street Which specializes in equities and bonds. So not crypto, but he had expertise in the area So what is a prop desk or prop trade anyway? It means that the firm is using his own money to seek profitable opportunities on low risk Strategies, so they're not gambling with money. They're not doing hodling. They're not doing long-term strategies For instance, one would buy bitcoin at coinbase and sell it immediately at okey x for profit So it's a bunch of small trades fast quantitative trading using algorithms and machine trading machines And of course they also use more complex strategies using derivatives such as futures and options But even if leverage is used The goal should be short term trades. So not no speculative speculation. No gambling. No long-term trades Oh in essence alameda and ftx should have been two completely separate business units, right? And um, are you thinking that alameda probably traded on other exchanges and held other ventures? I mean how First of all, um, you know confirm or deny that in traditional finance You know a prop shop or arbitrage desk should be separate from the business of an exchange and then Kind of fill me in a little bit on what you think happened that got alameda in this whole balance sheet wise That's correct. If you're going to trade at ubs jp morgan or golden sex, they're broker and Their prop desk is going to trade against you. It's going to be the counterparty the clients must have in written authorized Okay, I allow The bank or the broker being my counterparty If the client doesn't allow that if there's not written form agreement of that No, then the bank cannot trade against clients. That's not the usual on traditional markets but in theory There would be no problem for sam to be the owner of alameda research and be the owner of ftx And alameda research trades on multiple exchanges It's very common for market maker to do that mostly Use other otc debts or other lending crypto firms It's normal for their business. So at least in theory Alameda should not have loans or access to the ftx Balance sheet. It should not be the same money pocket. It should have been run Independently, and I think for the first couple of years it was However, after the luna and celsus inclusion Things went south for alameda. They lost money gambling And that's when well, maybe not gambling.  So it might as well have initiated Completely legal and usual So a collateralized loan using locked up eater or something. Let's imagine alameda had A billion dollars worth of ethereum Staked so they cannot withdraw this money, but it's worth something It's there it exists So it gives those rights the the the staked eater to ftx and tell well, it's worth a billion dollars. Can you loan me? half 500 million dollars for that because the money is locked up and f f tx says, okay Here's for 500 million dollars But i'm gonna take those a billion dollars in staked eater. So it's normal business. That's not a crime But eventually it entered as it seems a criminal era Because users deposited or siphoned took over losses on the prop trading firm And that's definitely illegal and the lack of transparency into the space Is why these things happen, right? Like it's very difficult to know what centralized exchanges or almost anything in crypto is doing with their money With whether it's staked where where it's invested What their profits and losses are it's it's all an opaque affair but why would other crypto projects hand their money to alameda research's managers and What is their relationship with salana and some of its kind of like decentralized finance protocols? Well, I imagine that alameda research likely promises those crypto projects. I have to return So you deposit your money with me. I'm gonna pay you six percent per year or eight percent per year Whatever But the lending business using crypto as collateral is part of the job The same goes for cumberland and jump trader the other market making and arbitrage firms They do loans and collateral crypto deposits But more important Sam was likely promised a high level of trading on ftx exchange and order of exchange that alameda used to do market making And maybe even say, okay, we're gonna support you guys. We're gonna deposit 100 million dollars in tvl to help jumpstart jumpstart your defy project because they had money from other clients To invest on these new issues the new launches Whether it's an fd whether it's defy whether it's the solana token in the ecosystem itself Ftx had a ventures arm. So it could invest In other projects. So as for solana, I'm not particular familiar with the ftx and alameda investment in solana If they were seed investors if they run a bunch of validating nodes, I don't know for sure But he definitely had a huge exposure to it So when alameda and the ftx went down his collateral The solana that he gave to other lenders As collateral had to be sold forcibly. So he was liquidated in Solana token and that's what caused the plunge same as the ftt token Hmm. Yeah, it's interesting that you mentioned ft now I remember in 2020 all the way up until now, but it kind of started in 2020 All of the crypto exchanges started to release their own native token. We had already had bnb since like 2017 or 2018 Cucoyne has kcs Okay, x came out with their own exchange token Eventually we get ftt and from what I understand on the user side or on the investor side is that Staking this token gives you a fee discount When you're trading on the exchange There's different tiers of fees and if you're in possession of that token Then you get a discount and then some exchanges would pair You know other altcoin pairs or assets with that token And I'm guessing that centralized exchanges were able to generate fee revenue off, you know transactions done and exchange token pairs or especially if it was like a stablecoin so I hear ftt is somehow involved in this when you look at that that leaked balance sheet It shows that a lot of the illiquid Um assets on the balance sheet are ftt or ftx token How is ftt involved in this kind of debacle and in your opinion is it risky? Strange to issue its own token. Why do they do that? Okay, good question Ray. So for the first part, how was the ftt token involved on all of this? Alameda Somehow had a lot of ftt tokens and it makes sense because they're partners So likely he invested when the the isio or the launch happened But most of the tokens had investing so he had to wait one two three or four years to be able to sell it So what alameda did with ftx was basically remember the example that I give That I gave about the locket Ethereum on staking the same happened to ft Alameda gave a bunch of ftt tokens to ftx in exchange for collateral for us dollars for bitcoins or whatever So if the price of the ftt token falls below a certain threshold The ftx is forced to sell to cover the loan otherwise he's going to lose all of the money So that's why I think or it seems that ftx was somehow manipulating the market or making sure that the 22 dollars was the absolute low because if you've dropped a lot from 22 the ftx would be ftx and alameda will become insolvent because it was a huge part of their balance sheet. I think there was like 16 billion dollars For alameda and I think a third of that were ftt tokens So if the ftt token drops by half their balance sheet likely goes down like I don't know by 20 30 percent So it was a risky operation And they were kind of propping up the ftt token price to get even more money loan from ftx so remember the The bnb and ftt and kcs They're literally free money the cost to issue a loyalty program token is near zero for the exchange All the exchange has to do is ensure that there's not liquidity on order work And some partner or investment vehicle vehicle able to buy some Tokens from time to time So because if there's no buyers, they're only service it's going to drop every month And in Sam's case alameda was the perfect partner with a vested interest in pumping ftt price up The issue as it seems is that alameda got loans from ftx Using those ftt tokens as collateral So when the ftt ftt price collapsed alameda became insolvent causing a huge crisis for ftx but in essence Issuing the tokens is free money for the exchange. So every everyone should Do it Huge instantives to do it, but accepting them as collateral for loans. That's crazy And i'm guessing that as ftt price goes down There's margin calls on any open positions that ftx or alameda has throughout the entire crypto and defy ecosystem Correct alameda certainly Lend out solana tokens and ftt tokens to other partners In exchange for us dollars or bitcoins and once the solana and ftt price Fall over their margin. They the counter parties sold those tokens on the market So it creates a cascading liquidation as we call the more it goes down the more forced The the lenders are to sell those tokens Yeah, so assuming that what sam because he's been tweeting a bit So what spf said today about having enough collateral to fund clients deposits, but not enough immediate liquidity to Like make good on those redemptions. Does that mean that the worst is behind us? Okay, first, let me answer two questions here from the viewers on the youtube. The first is king Junior trading ftx right now easy profits guys well It could be easy because the prices are likely distorted on ftx right now Because you can't really withdraw. Yeah, they open withdraw today for 10 million dollars But they have over five billion dollars worth of deposits Clients deposits trying to get out of the exchange So I don't think you're really making any profits trading there So I would stop trading I will leave anything you have over there in stable coins or in bitcoin and don't trade because It's paper gains until you can realize that you shouldn't be wasting your time on your energy on that The second question comes from modding unlimited Any possibility to increase the price of ftx? Is it time to buy long? No, I don't think so We cannot trust what sam is saying right now that he has like I don't know money to pay everyone He only doesn't have liquidity to pay right now because he lied a lot in the past So we should not trust him with that So I don't think it's time to long ftx token because if the ftx exchange goes Belly up or if the governments intervene, uh, for example cftc or whatever Intervene and exchange gets halted for six months Then the token will likely drop to zero really quickly So I think the risk reward is not there right now If you want to place a bet Choose a coin that you already carry that you already like like bitcoin or ethereum or whatever coin that you like And say okay now it's the time to increase my monthly what I what I buy every month I'm gonna buy three times that once or I'm gonna buy 40 of the money that I have On bank right now, but I wouldn't go all in especially on ftp right now Uh Now what was your question again? Um So sam had if sam has the money Yeah, exactly If if the word is the worst behind us Yeah, it's the worst behind us if if justin's son Is able to bail out ftx and acquire them in the same way that finance was or if ftx is saying that they have sufficient collateral To eventually make good on clients, you know desired redemptions But they just can't do it right now Does that mean that the worst of this market sell-off is behind us? Should we expect to see the market prices kind of stabilize and then consolidate or Is it possible that this thing continues this viral out of control? tough question tough question ray, uh, I don't think that the worst is behind us Because alamed research is far more entangled with the crypto ecosystem than ftx itself So even if the ftx clients are paid in whole over the next three to six months The confidence in the system has been broken has been shattered and likely every alameda partner Including miners landing desks and the crypto projects that had deposits over there. They will lose it all They're not like the ftx clients They were partners of alameda. It's a whole different thing So surely in the long term this event takes some pressure off the market some risk It's off the table, but in the short term who knows what other exchanges Or stable coins might be in deep trouble. So assuming that the worst is behind us. I don't think it's true Because we know that ftx had extended credit to Voyager digital block fi And many other companies after 3ac luna and celcius collapsed, right? Um So, I mean these companies have exposure and recently we we saw sequoia mark down there 200 million dollar investment To zero, right? Um, so i'm just curious like What sort of collateral damage do you see possibly coming from People that had invested money in ftx or alameda um, but Have their own responsibilities to clients have their own portfolios with tokens in them Eventually, it's possible they might start liquidating those positions just to cover What is now a hole in their balance sheet? And that could possibly put more kind of like sell pressure on prices in the crypto market, right? Mm-hmm. Well, great. Those are two different things. So gizeli tom brady sequoia Those were investors in ftx the company So this is venture capital money and it's a long-term investment and sometimes it goes belly up now Onto alameda's regular day-to-day business operations of credit and lending which involves other firms and miners There will be definitely some contagion out there. I've heard that more than five projects including The biggest defy in solana and someone on the aptos ecosystem Most of their treasury was deposited on alameda so But I don't think this has a direct market impact as you said With these guys before us to sell their bitcoin and ethereum other cryptocurrencies positions because of alameda blew up No, I don't think so The users If if the money is tied up for three or six months in the exchange Yeah, definitely they will have to sell other positions or other investments in crypto to pay for the day-to-day operations But as for the investors on ftx, I think it's business as usual So, you know bringing it back to actual markets and bitcoin How does the market go forward from here? What are your expectations in terms of bitcoin and crypto market structure? How do you feel about the future of a bull market? The bitcoin halvings coming up and I don't know the amount of days. I haven't looked in a while, but it's probably like 600 or so days What like looking at derivatives markets? What are you seeing there? Is this the time to buy the dip? Are we going to be bearish for a whole year? As an investor, how are you interpreting this and what are you planning? Well, I still think we can go down as low as 12 to 14 000 dollars if Some stablecoin goes belly up or if regulators come and I don't know shut down almost the entire us american and european crypto markets At least the fiat's gateways So it would be much harder for an investor to buy Cryptocurrency because he would have to send money abroad or use some payment gateway But not directly on coinbase and kraken and regulated venues as they have today So I do think that regulation is up on us. So they're coming with a large hammer And I do think that the stablecoins do not Have enough transparency. I don't really trust Tetra and Bitfinex. There's no transparency from that They have been promised audited balance sheets since 2015 and they've never done it so I think we're gonna have problem either in regulation or with either contagion risk from stablecoin markets And some other exchanges may be coming out insolvent. So in that case I do think that if you are a bottom fissure, if you say I want to wait for blood on the streets I don't think that a 20 drop from 20 000 is what we're expecting. That was not Three sigma event what we say that happens once every 10 years or so that was something That one should be expecting when dealing with cryptocurrency markets because as you said yourself There's no transparency. Those those are centralized institutions without regulation so But my strategy has been always the same like dca buy buy a little bit Every month of the coins that you like Buy and hold and don't get desperate if this falls 50 percent from your entry point It has happened in the past. That's the fourth cycle that we see is of bulls and then bear markets And then bulls market and bear markets. It's normal for this market. It's nothing out of the ordinary Yeah, I agree Now I've got a question for you And what is your thought on cz the binance founder and co And and his attitude towards the whole ftx debacle. Do you think he intentionally crue sam under the bus? Well, that's a tough question. I'll be honest and say I don't know. I don't know either of them personally I'm not sure what's behind it But when coin desk got The alameda research balance books leak and the world saw how potentially illiquid alameda might have been And then remembered its tight relationship to ftx Binance being a major bag holder of ft t could have had the same concerns that we retail investors have And um, that's when cz announced his plans to start selling off ft t, right? Now Is there some three or four dimensional chess going on probably? Um, you know, we don't have any insight into that in terms of killing a competitor and absorbing their market share Um, maybe it would have been a potentially sweet acquisition To to acquire ftx, but it just didn't play out like that um What I think happened is investors are just right now coming off seeing, you know What happened with terra luna? What happened with celcius wonderland money three arrows capital We have all um as investors gone through these insolvencies these Ponzi schemes and these scams And when that balance sheet leaked The writing was on the wall. It looked like a very similar situation to uh the previous shops that imploded on themselves Because of bank runs and liquidity issues. So what happened was uh, a bank run was triggered on ftx and Halas, that's the end of story Cz is the victor here because he's got deep reserves at binance um You know anyone who's left that has money that wants to keep trading is probably Going to migrate either to decentralized like web three metamask based dex's like gmx or cap or You know all the d5 dex's that are on arbitram or they're just going to port over to To binance and other exchanges that appear to be more forward-facing. So It was a win-win for cz acquire ftx win Kill ftx or watch ftx crash and burn Win right like it was uh, there was it wasn't a pirate victory. There is no loss Um in the long run to binance from my point of view They're still incorporated not in america and not in china out of the reach of regulators. So Yeah, they win So I want to like two comments from our viewers and I want to thanks everyone who's joining us at youtube and twitter links Uh, but then i'm gonna add a question myself. So andres arcos What about what about going forward with proper regulation? This is obviously something that is illegal and there's also The stealers 68 Invest in usa exchanges and remove your coins. Do not invest in offshore exchanges So ray you live in the new united states, right? Yeah, let's let's forget that ftx is a crypto business. Let's assume it's Regular fintech, maybe traditional equities business And assume that owner simply flat or gambled with clients deposits So first question is how long does it take for regulators or three-letter agencies to intervene? And after they intervene, what are the odds of the users being able to withdraw? After the service gets halted This reminds me of a old crypto meme with arthur haze the creator of 100x, right? Former ceo of bitmex. He used to love to say incorporated in the seychelles bitches So Sbf and ftx are non us. They're they're not in the u.s. And they're their headquarters are not In the u.s. They're in the bahamas Does the security's an exchange commission does the cftc Does the u.s. Justice department have jurisdiction over financial companies? That are outside of the united states of america I don't think so Is fbf gonna do a runner like arthur haze zoosu kyle davies danielly from wonderland oxy foo Doquan and all those other wise guys I don't know but it would make sense, right to go on the lamb and room up with doquan and You know just enjoy all the billions that you've accrued and run from the law from a few years um In my very limited opinion based off, you know recent and old events of similar nature and crypto It is not easy for regulators to intervene. It's not easy to get this money back or hold anyone accountable Um these people need to come they need to be u.s. Citizens. They need to be In the united states, right? They need to turn themselves over to authorities Um and stand in court and be held accountable Or I guess the feds or whoever have to go track them down and capture them and bring them back here if Any wrongdoing was done people from the Mount gox hacks are still waiting to get their coins back, right like these scams happen all the time in crypto or these type of events happen and People don't get their assets back and as you know bankruptcy courts can tie up your assets for years leaving investors with nothing or just pennies on the dollar um and You know crypto is so volatile So if you've got money locked up in ftx and in two or three years things are settled in the courts and What you was what you were owed is given back to you It could be worth nothing. You might get back your 500 solana tokens or ftt or bitcoin But it might only be worth a fraction Um of what you initially invested. Uh, it might be fully worthless. So Because there's no regulation because these companies are offshore out of the reach of regulators Um, I don't think that it's easy to capture these guys to recoup funds to hold anyone accountable It's hard news. It's not what you want to hear as an investor, but I think that's the reality Okay, but ftx Has an arm separate ftx us Do you think that governments should or could have steppied in earlier to protect those us clients? What can they change in regards to regulation to reduce such risks going forward? I don't think they could have because if they could have they already would have done it Especially in the usa under chairman gary ginsler, you know, the sec had Um, I think that a clearer regulatory framework for the crypto industry Um is what is necessary and if when that exists It will entice more crypto companies to headquarter in america rather than podunk islands with zero regulations, right? Um, I think regulation would make it easier. Um, or I think, um a regulatory framework on How do you raise funds? What is a security and what isn't a security all that sort of stuff? I think would make it easier for companies to secure Uh, the right type of funding from the right type of institutional investors and it would allow For the enforcement of rules on how transparent these companies have to be about filing their positions And other balance book related data And it would help then investors avoid ponzi schemes and getting involved with massive collapses and cryptocurrency infrastructure so While most of us are kind of like anti regulation And afraid of regulation and don't want regulation I think many of these like instances ftx alameda, wonderland money felsius terra luna block fi possibly I think they all show that there is a need for just There is a need for regulation. There is a need for a more partnership between fintech crypto and legislators I think I think that's a good recap of What regulation can do and what they had not intervened? And my message to the viewers don't do anything desperate if you have money tied up on ftx weight Even if it's a year it's worth it Your friendships your life it's worth much more than that So focus on what you're going to do next what you didn't pass you can't really change So I've seen a lot of people went from I don't know a thousand dollars to two hundred thousand dollars Back to two thousand dollars about a thousand dollars and make it all back over the course of four or five years I'm not going to make it back in one day, but don't give up the crypto industry You continue growing it's not going away because of some Ponzi schemes or from centralized exchange that have been rugged people money over and over There's a lot of decentralized exchanges Bitcoin works without any institutions without government and it's going to continue working. So Focus on that build a portfolio Buy a little bit every day do so dca and don't lose money or don't do desperate things Yeah, I agree a hundred percent this this is not over yet. We're not just going to bounce back I think in the short term to be honest with you I think liquidity is going to seize up for a lot of these crypto companies and the bridges that were built between traditional finance and crypto in terms of like banking lending investing Building that institutional and retail oriented like infrastructure and products. We're going to see a set back there It's possible that more than 20 billion dollars is being vaporized by this whole alameda ftx close up And the contagion is going to spread to their investors and it's going to have a knock-on effect on their balance sheets And for the client funds that that you know, they're on the hook for so In my view, it's a complete like krakatoa level event The shrapnel from this explosion has not hit everyone yet Where they got hit and they have puncture wounds, but they haven't realized that they're bleeding from it or felt the pain yet So we're not done in my opinion.  Look for good fundamental investments. Think about dollar cost averaging into Bitcoin or ethereum or assets that you're long term bullish on at this point, right? but this market was overheated and We're seeing prices kind of come back down to More fair valuations depending on how you actually like what are the metrics of fair valuation for crypto assets? Anyway, that's that's something that's constantly under argument, right? But The market goes up By the stairs and it takes the elevator down and this is just another example of that, right? So We have all got to um, you know, take a deep breath and relax There's no need to fomo or hop into positions just because they're like two standard deviations Outside of the range that they've been trading in it's going to take a while for things to stabilize and build back up So this is a good time for investors to do their homework and pinpoint assets that they have a long term rock solid thesis on and Start making a plan for how you're going to invest in them So that's pretty much it. Um, Marcel. Thanks for coming on and just kind of walking us through what happened with ftx Alameda, uh, your perspectives on where you think things are going to go from here and We will be here next thursday at 12 et so thanks everyone for doing it Make sure to like and subscribe Press the bell on so you get notified because every thursday Ray is here with interesting insights from the markets and exclusive for quintet earth Thanks, ray. All right. Thanks everyone. See you next time


What's up everybody, Jason here for JaspysKHPAC.com, with this pack filler here for 1920 Mosaic Hobby, pack number 389, just sells out the last eight teams in select basketball picker team number one. So again guys, you get a piece of, or sorry, the way it works is first, we do the break, we randomize the customer names, teams that should be the hits out of the hobby pack, then at the end we'll randomize the 30 customer names, and the top eight names match up with a team below. So the thunder we're $300 all the way down to the clippers, so let's do the pack filler first guys, click roll, three to six nine times, good luck, one, two, three, four, five, six, seven, eight, nine, JC, Donna Jackson, nine times, one, two, three, four, five, six, seven, eight, nine, nine times, clippers, down to the pastes, and again guys, no trading for the pack filler, stick to what you got, I'll give you like 30 seconds to see your teams right now. So alphabetized the pack filler really quick, and it looks like it's going to be a redemption too. Redemption, Darius Garland, Tristan Thompson, they have a Steve Nash, Bowl Bowl, Tyler Hero, RJ Barrett, alright, trying to think who was a redemption in 1920, see who this goes to. Autographs Mosaic, number 23, it's James Worthy, that's awesome, Lakers, who has the Lakers in this, David, they go it is expired, but you know for the most part, they will accept it of course, if they have it and if they don't they'll give you some points or something replacement. Hey, still an autograph, so crazy how far 1920 is now, now that we're in 2023, alright, I remember like it was only yesterday. Alright, now let's switch scenes and again, here's the dice roll, here's the customer names, let's click roll, it's a four to four, eight to hard way, good luck, now remember top eight get a team guys, top eight, one, two, three, four, five, six, seven, eight, boom, eight top eight are in guys, so Sam just sneaking in and getting a team, Carlos, Kenban, Steven, Kev, Adam, Steven and Jackson, congratulations, boom, so I'm going to copy and paste the whole list, but of course only the top eight are going to match up with a team, so unfortunately the rest of you guys are not going to be part of the break, but thanks for giving it a shot and Jackson, congratulations man, thunder we're like a three hundred dollar team, Steven, nice pistons team right there, like what, 170, 180, same thing with Adam Cumberman and the Rockets, Kev, Blazers very nice, and then Steven Flag, you got the Knicks, Kenban with the Cavs, Cardle for the Bulls, and then Sneakin' and Sam you got the Clippers, so there you go guys, so now I'm going to paste these names into our lists and we'll be starting picketing number one soon guys, thank you.


I do my very best to keep my life simple, basic, buy less things and stay organized. But still, I own a lot of stuff. Stuff like clothing I use to wear. Kitchen tools we have double. Things I've collected. An alarm clock that makes getting out of bed super easy. Yeah, cables. Lots of cables. Things I like when I was a kid. Old technology, which is not designed to last. A lot of these flat plastic discs. A huge amount of books.  Because, well, we like chicken. But making something like this is super complex. It contains a lot of different parts and materials. They're probably sourced all over the world. Then made in China, shipped to Europe and finally sold for a couple of bucks. For fun. I mean, I truly appreciate the gesture. But next time, don't buy me a joke. Just tell me one. And most of this stuff ends up in a box, squeezed in a closet on a place where I don't see it. So why do I keep this stuff? And then I write this somewhere. It hit me. It's time to get rid of this live luggage once and for all. We have too many books. And this is when you realize the amount of stuff you own. So much stuff I don't need. I've put it all in a trunk of my car, drove it to a charity and gave it all away. I don't want to do this ever again. So I've made two things.  You can get it as well. Second, a wish list to Santa or whoever wants to give me a present.


Hi, hello, welcome to proxies pods and ports. I'm Aaron Alpar with cast in by beam cast and makes backup products were currently number one in Kubernetes backup. My name is Aaron Alpar. I've been working with Kubernetes since approximately 2016. Today, I'm going to be talking to you about various ways of accessing pods. Coupe cuddle has provides various means of getting access to a pod I'll be talking about those. And this is going to be a wide ranging presentation and my focus is going to be on covering most all the ways there are to do that all probably almost all of these will be familiar. What I'm hoping is is you'll pick up little bits and pieces that you may not have known along the way. So, this will be a good overview of the available methods, as well as getting into some details that may be interesting. So, pods have various access points using Coupe cuddle. It can be access to the API server. I'll be talking about methods of doing that. I'll be talking about using port forwarding to access pod ports directly. And I'll be talking about the standard streams standard in standard out and standard error. I'll be talking a little bit about logs as well. So just just for complete coverage. What I'll be talking about first is the API server proxy. The API server proxy allows direct access to the API server by HTTP proxy. Here you can access the API server by using a local port HTTP to access the API endpoints and Kubernetes. This is really valuable for scripting for debugging and in some cases accessing alpha or beta features that don't yet have integration with Coupe cuddle. This is similar to using raw the raw option on Coupe cuddle if you're not familiar with it that's okay. I'll be talking about that more. This presentation is going to use plenty of command examples and these command examples are going to be executed against a deployment and a service. Here's the YAML for both the deployment and the service and here's the deployment. A very simple engine X deployment with an engine X container. The service allows network access to that engine X container on port 80. Here's service YAML for that. The first topic I'm going to talk about is the API server proxy API server proxy allows direct access to the API server by HTTP connection from a local port. This is very useful for debugging or executing commands that are in alpha or beta and not fully supported in Coupe cuddle. Forward connections are forwarded to connections are automatically amended with authentication state. So there's no need to provide additional authentication when forwarding connections. Here's how you start up an API server proxy. It's very simple Coupe cuddle proxy. There are other options here for specifying local ports or hosts to listen to. In this case, we're just going to go with the default options. This will start up a proxy that listens on eight port 8001 on local host. In this example below, I'm testing it out by getting the root for the API server, which will show me a list of paths that are available on the API server. Here I'll show you a couple of examples of Coupe cuddle commands and how you might represent those as curl commands. Once you're using the API server proxy. So here I'm getting all the namespaces listed as table. And here I can do an equivalent by accessing local host 8001 API V1 namespaces and that will list out the namespaces. Here's an example of getting a singular pod. In this case the engine x deployment pod. And here is a curl example that I might use using the API server proxy. Now the API server proxy not only allows you to access resources, but it allows you to access ports on pods and services. So talking a little bit about that. And specifically I'll be talking about service services and accessing service points ports first. So, assuming of course that you have a API server proxy running locally. Here's a curl command to go through that, and you'll see here that I'm accessing a service in namespace demo one. The services call engine x service. This is the service that I showed you earlier in the ammo file. So on the end, it has HTTP. So for services, this HTTP that's on the end is a service name, the port rather the port name in the service that I want to proxy through. At the end you put slash proxy, and that is the API servers indication that you wish to proxy through this port. And at the end below, once I proxy through that port is actually accessing the engine x server that's behind that service. So, this is a really handy way of proxying to services without actually through the API to the API server proxy without having to set up a separate proxy. Of course this is only going to work for HTTP or HTTPS connections. So for that proxy URL, you can add any other additional URL path options as well as a query parameters. In the case that I showed in this case, it's the YAML I showed you earlier, where the port has a name HTTP. And you can see that that's the same that maps the same name that's in the URL. Here's the full form for that. If you're using API server proxy, and you wish to access a specific service port, this is how you'd go about doing it. Again, additional URL URL path parameters can be added on to the end as well as query parameters. So, if you'd like to do the same similarly for pod, you can do that. The form is very similar. In this case, I'm using curl against the API server proxy to access port 80 on on a pod. In this case, it's a pod in my deployment engine x deployment. And you can see here that I'm accessing a port 80 on the pod. So once again, just like the service example, this shows that I'm accessing engine x. And accessing engine x it's running on that pod on port 80. Similarly, if we actually go and look at that pod we can see that the container port is exposed on port 80. And that's how I would get access to it. The form is very similar to the services. Except that you specify a port number as opposed to a port name. So, kubectl proxy offers the ability to access resource definitions within the Kubernetes API in the Kubernetes API server, not only that but it allows you to access pods and service endpoints, very useful for debugging. And I'll talk a little bit about that. Next. So, you can use the kubectl proxy to get access to the API server and basically use it for debugging and something that's valuable is to use kubectl v9 dash v is the verbose option. It's developed by an integer and you can specify an integer all from zero to nine. The lower the value the less debugging information the higher the value the more debugging information. What's special about the nine is that it outputs curl commands that can then be modified and used to access resources to your proxy server. So in this example, I'm simply getting all the pods from all the namespaces. And I'm spacing fine verbose nine on the command line. Here's the output from that and this is the first few lines here are all debugging output. And what's buried in there is a curl command. So this curl command is the curl is the equivalent. If if kubectl was using curl it would be the curl equivalent of the URL, or the endpoint that it accessed in the, in the API server. This can be modified and used to then execute that against the API server. Once again, you would set up an API server proxy in order to get access to that. So it's very useful to use this in conjunction with kubectl to be nine to see what the URLs that the kubectl is actually accessing in the API server. And then you can do some debugging using the proxy. What this offer you is non truncated debugging output for kubectl which is very valuable. It's useful for also getting those curl commands for the API server equivalents to kubectl commands. And if you like you can use value values less than nine to output less eight truncates output seven just provides headers so on and so forth. So that's that is it for the API server proxy. What I wanted to talk to you about next is something that's similar which is the raw option on kubectl. Get create and delete all offer dash dash raw option. This allows you to submit you API server URLs using kubectl and it provides JSON output. So I'll show you. Here's an example of using dash dash raw. I'm using kubectl get but instead of telling it what resource I'm looking for, I'm going to give it a dash dash raw option. And then this should look familiar the API v1 namespaces. This is going to list all the namespaces that are available in my API server. If you're not familiar with jq I recommend you get familiar with it here I'm piping it through jq. This is just going to format the JSON for me nicely. And below you'll see that I'm getting a list of namespaces out. Of course this can be used for basically any endpoint that you could normally use with the API server proxy. Here I'm getting the service engine x service and piping it through jq again and there's a JSON for it being being output. So, those are examples of get. Now I'm going to show you an example of a delete and a create. And in order to do that, I'm going to be using this service dot JSON file. All this is is the service that I had earlier in JSON instead of YAML. So, here we go. If I go ahead and I can go ahead and could cut a delete. I use the raw option and specify the API server URL. For the resource that I'd like to delete. I have to specify a full name here. And in this case is I'm going to delete the engine x service. So, I get the JSON response that says that it worked. And then go ahead and recreate that using kubectl create dash dash raw. Specify the resource name or resource type that I'd like to create. Give it the file for the JSON and it'll create it. And if it successfully creates it, it'll output the service back to me. You can pass in query options when using raw. Here's an example of using a limit to limit the number of results that come back. So, the raw option on kubectl allows you to get access to get post and delete methods in the API server from kubectl without the need for setting up a API server proxy, rather handy that way. So, you are all query arguments to do things like limit the number of records that come back, set continuation tokens, so on and so forth. So, it's a very good tool to have in your toolbox. That's, that's pretty much covers it in terms of ways to access the API server or the API's using kubectl either by the API API server proxy or by using raw. That'll give you access to basically any endpoint there on the API server for getting resource metadata. There's another way of accessing your ports and services and of course that's through port forwarding I'm sure most of you have already used this. I'm going to be giving you a very short overview of port forwarding basically for completeness to show you that it's here and discuss a couple of limitations of it. Port forwarding forwards TCP ports to pods and services. Container specifically. It can only do TCP, it can't do UDP. It uses HTTP to streams to go ahead and do this, which can create some difficulty if you're, if you have a proxy server reverse proxy rather between you and the server that you're trying to access. And this is really, really handy if you want to browse the contents using a web browser and one of your pods or containers. So it's handy. You can use this to pass through any TCP protocol, not just HTTP and HTTPS as you would get with the, the API server proxy HTTP and HTTPS endpoints so any TCP protocol will work. It's very straightforward to set up it's basically very similar in operation to API, excuse me, kubectl proxy kubectl port forwarding. Here it is. All you do is specify the pod or a service which you wish to access on the other end. This is an example of the pod. The target port that you wish colon and the target port that you wish to access. In this case port 80. No, I'm, it's, I'm not specifying a number on the left hand side I'm only specifying a number on the right hand side of the colon which is port 80. What this will do is it'll assign a random local port to forward to that port 80. And in this case that random local port that identified was 54688. Here it's porting for port forwarding that randomly selected port to port 80. I could specify a port on the left hand side, in which case it would forward that local port to port 80. I'm not going to be discussing any of the details in the options. Again, this is provided for completeness mostly. So here I go ahead and do a curl command against that using HTTP, and I'm accessing my engine X server on the other end. So that once again, very brief overview of kubectl port forwarding. This is something I'm going to cover briefly, which is logging logs in Kubernetes are simply output to standard out or standard error from your pods and containers. Now this is routed into the logging subsystem, which is then stored on disk standard out and standard error merge together into one stream. The stream is rotated regularly, typically it goes to five rotations, either by time or by size on the on the node. kubectl logs only accesses the last log in the rotation. So that's something important to know. Logs also can be retrieved for the previous container instance, which is handy. If the previous container happened to fail due to an error can access the previous containers logs to perform debugging. Here's some examples of here's some examples of retrieving logs on the nodes. The first one is simply simply getting the logs out for my engine next deployment. In this case is getting all containers within the engine next deployment, which is, which is handy. Keep in mind that you can use label label matching for for logging. So in this next example, what I'm doing is I'm getting logs for all containers with the label of app engine X. I'm adding a prefix on that so I know exactly which container it's coming from, and I get the output. So that's handy if you're looking at a group of containers that are associated with a particular application for instance. Next I'm going to talk to you about kubectl attach like logs kubectl attach allows you to deal with the output from standard out and standard error. Unlike logs, it allows you to deal with standard out and standard error separately as well as gives you access to standard in. So you can use kubectl attach to get access to all three of these standard streams for terminal access or for separate access to standard out and standard error. You can even the option to allocate a TTY, which allows full interactive access to shell for example, that's running in your pod. Here's a very simple example of kubectl attach here I'm running kubectl attach to redirect standard out and standard error from my engine next deployment pod in namespace demo one. So I'm going to take us a slight digression and talk about kubectl run. Talk about kubectl run, because this is closely related to kubectl attach. So, here in this example, I'm using kubectl run to run a pod kubectl run is basically a quick way of getting a pod up and running for a specific container. In this case, it's just running busy box. Here, I can specify dash, the options dash I and dash T, I allocate standard in dash T allocates a TTY. And here I can see the effects of specifying the dash T below. So if I do the kubectl run, it's going to log me in to the to the container, give me command prompt and I can go ahead and type TTY. Here you can see that I have a TTY allocated on the PTS zero. So if I take a look at the file descriptors for my first process, you can see that all of these are routed to TTYs are routed to the TTY that I've allocated. This is a slightly different version of kubectl run. And you can see here I've left off the T option but I left the option on. So I go ahead and run busy box and it's going to attach to it once again, and I can enter a few times and this is going to allow me to execute commands. Here I'm going to run TTY, just as I did in the previous example. And you can see, not a TTY, since I haven't allocated to TTY. So if I look for my file descriptors for the first process, you can see that these file descriptors are all forwarded pipes, these pipes presumably go over the network to my local client, which allows us access. So now, kubectl run, actually, you can think of it as executing two commands, the run command itself and a separate attach. So here I can run kubectl run with the same options but at the very end, I'm going to say attach equals false. This tells kubectl run not to run an attach after you've run the pod. This will just run the pod in the background and wait for an attach, which I'm doing here. So I can go ahead and attach to it. Again, I specify my pod, and as before I can go ahead and run commands in that pod. So, I'm going to show you a couple of examples that show you the various effects of the options from kubectl run on kubectl attach. Here I'm running kubectl run dash int, so I'm allocating standard in and a tty. I'm going to run that pod in the background with attach equals false and then later on I'll go ahead and attach to it. And in this case I'm going to attach to it, but I'm going to redirect standard out and standard error to separate files. I run that, I hit return a couple of times, and since I've attached standard in, I can type commands. So in this first example, I'm going to echo the string standard out to standard out. I'm going to echo standard error out to a file descriptor two, which is standard error, and then I'm going to log out by hitting control D. I can then inspect the standard out and standard error files to see what was actually put in there. And you can see here in standard out, it got both the output from standard out and standard error. And if I can't, if I can't standard error, you can see that it only says, if you see this command prompt try to press enter if you don't see command prompt try to press enter. So here by specifying the T option, it's folded standard out and standard error into the same stream. That is the standard out stream. So if I leave off a T option here, when I run, when I run the pod, and then I do the same as I did before with the redirections and run the same commands that you can see here that the output and the files are going to be different. This actually separates standard out and standard error. So I can treat each stream separately. Very handy for debugging. KubeCubLattach allows you to forward your standard streams locally to your client, which is very handy. If you'd like to be able to split out standard error and standard out, then you should not use the terminal allocation in the pod, either in the TTY options within the pod or when you use something like KubeCubRun or KubeCubLexact. So that's it. Proxies, pods, and ports. A very cursory overview of what I've covered today is that KubeCubLattach gives you direct access to your API server, which can be very handy. KubeCubLattach not only gives you direct access to your API server but allows you to access HTTP and HTTPS endpoints on your pod and services, which is very handy. KubeCubLattach v9 can be used in combination with the KubeCubLattach proxy and just KubeCubLattach commands for debugging. It outputs curl commands into the log so you can copy and paste those curl commands for testing. So you can use KubeCubLattach with dash dash raw, which gives you very similar effect to using the KubeCubLattach proxy command without having to start a proxy. This gives you access to HTTP get, delete, and post methods, which is nice. As before, it also allows you to get access to HTTPS endpoints on your pods and services. KubeCubLattach allows you to forward standard streams to your client. If you wish to split out standard error and standard out, remember to not allocate a TTY on your pod or container. So, and last but not least, port forwarding for TCP traffic by HTTP2 from a pod or service. The HTTP2 sometimes can get in the way of using proxies so be mindful of that and it will not forward UDP traffic. So that's it. I hope you enjoyed the presentation. Here are a couple of references. One covers proxies and the last one's quite good. It's all about cluster access, similar topic to this presentation. So thank you. I hope it was helpful.